Vb-Oracle odbc connectivity [message #99800] |
Mon, 08 April 2002 21:00 |
Vikas Kale
Messages: 8 Registered: March 2002
|
Junior Member |
|
|
What are the software required in windows 9x/me environment by which vb(6.0)-oracle(8.1.7.0) client connectivity will be possible. Are there any problems in this connectity. If so, how to solve it.
|
|
|
Re: Vb-Oracle odbc connectivity [message #99803 is a reply to message #99800] |
Tue, 09 April 2002 12:20 |
Paul Antony
Messages: 9 Registered: December 2001
|
Junior Member |
|
|
First of all you've to install the oracle client on the windows 9x/me box. After that, use the net8 assistant to setup the service connection. You can test the connection on net8 assistant itself. Otherwise get to the prompt and type 'tnsping <servicename>' and substitute the service name here.
You should all be sset. In VB you can then use oracle oledb provider or just oracle odbc to connect.
|
|
|
You can connect by using this code in a VB6 module [message #100210 is a reply to message #99800] |
Sun, 08 September 2002 19:09 |
Tareque
Messages: 1 Registered: September 2002
|
Junior Member |
|
|
Public Sub Tareque()
DBopen.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=tareque;Extended Properties=DRIVER={ORACLE ODBC DRIVER};SERVER=APEXTAN;UID=TAREQUE;PWD=sonartory;DBQ=APEXTAN;DBA=W;APA=T;FEN=T;FRC=10;FDL=10;LOB=T;RST=T;FRL=F;PFC=10;TLO=O;"
DBopen.Open
End Sub
|
|
|
Re: Vbconnectivity [message #100929 is a reply to message #99800] |
Sun, 22 February 2004 21:09 |
sandeep
Messages: 110 Registered: October 2000
|
Senior Member |
|
|
we can use diffrent method. i am sending a method through you can provide connectivity.
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=MSDASQL;dsn=NEW;uid=scott;pwd=tiger;database=new1;"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select * from
", db, adOpenStatic, adLockOptimistic
new1 is database name
NEW IS dsn. So first make a system dsn through ODBC datasource.
bye
sandeep
|
|
|
Re: Vb-Oracle odbc connectivity [message #101008 is a reply to message #99800] |
Mon, 22 March 2004 21:26 |
alihadim
Messages: 5 Registered: March 2004
|
Junior Member |
|
|
Dim cnn As New ADODB.Connection
'
Set cnn1 = New ADODB.Connection
strCnn = "User ID=xx;Password=xx;Data Source=xx;"
cnn1.open strcnn
-----------------------------
before You must add to oracle odbc driver. ok
there are question user Id pw and server....
and they must same datasource name and odbc drive name
-------------------
|
|
|
|
Re: Vb-Oracle odbc connectivity [message #101092 is a reply to message #101051] |
Tue, 27 April 2004 01:43 |
ashley collado
Messages: 5 Registered: May 2003
|
Junior Member |
|
|
Pls use this sample code:
>create a new project and add reference for MS ADO 2.x
>U must have a working client connection to an Oracle service, like in my case, the service im connecting to is "DEV" as been defined by Net8 in my TNSNAMES.ORA
-----------------------------
Private Sub Command1_Click()
Dim Conn As New ADODB.Connection
Dim rsTest As New ADODB.Recordset
Dim strSQL As String
Conn.ConnectionString = "Provider=MSDAORA.1;User ID=DEVADC;Password=DEVADC;Data Source=DEV;Persist Security Info=False"
Conn.Open
strSQL = "SELECT USER,SYSDATE FROM DUAL"
Set rsTest = Conn.Execute(strSQL)
MsgBox rsTest.Fields(0) & " : " & rsTest.Fields(1)
End Sub
|
|
|
Re: Vb-Oracle odbc connectivity [message #101168 is a reply to message #99800] |
Tue, 01 June 2004 08:41 |
sdmcnitt
Messages: 2 Registered: June 2004
|
Junior Member |
|
|
We just completed a project with VB/ADO/ORAOLEDB/Oracle and it went pretty good. My first time with Oracle as back end.
We chose the free provider from Oracle because we had to work with CLOB data type and the Microsoft provider does not support it. We also used the new Timestamp data type and found that ADO 2.6 did not support it (crashed windows). Workaround was to create a function that turned the timestamp into a text string (for concurrency control).
We even had an example of running an asynchronous open of a recordset with the ability to cancel the query (easy with the Microsoft drivers and SQL Server). Problem was that the query/process/etc kept running after the cancel method unless you killed the session.
Some issues we never fully explored or resolved. For example global/constant/dedicated connections vs connect-on-demand (the Oracle guys wanted dedicated and the VB guys wanted to simply pass around a connection string and connect when needed). It was decided by the DBA prior to coding and caused problems with code structure and unit of work.
Fun project. I miss it already (now using ODBC from Access on current project).
Have fun.
|
|
|