Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to Oracle missing expression error

Status
Not open for further replies.

Kozia

Programmer
Sep 9, 2002
18
0
0
CA
I desperately need help on this one
I have a code someone posted for me but I am running into a missing expression error.

Set conn = New ADODB.Connection 'Define new ADO connection
Set rstmat = New ADODB.Recordset

strc="DSN=oratst0;UID=BUDLINK;DBQ=tst0;ASY=OFF;PWD=TST0BUDLINK"
With conn
.CursorLocation = adUseClient
.ConnectionString = strc 'Use parameters provided in strc String to make a DSN connection
.Open 'Open connection
End With


With rstmat
.CursorLocation = adUseClient 'Define recordset as being server side
.CursorType = adOpenKeyset 'Define cursortype
.LockType = adLockOptimistic 'Define locktype allowing updates
.CacheSize = 50
.Source = strSQL
.ActiveConnection = conn 'Define connection to be used for the recordset
.Open 'Open recordset
End With

Stops on .Open line and gives me the following error:
Run-timeerror'-2147467259(80004005)':
[Oracle][ODBC][Ora]ORA-00936:missing expression


What is the problem anyone!!!????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top