VBFOXDEV35
Programmer
All:
This is driving me crazy. I have the following code to access as SQL server table:
LOCAL oAdoConn
LOCAL oADORs
oAdoConn = CREATEOBJECT("ADODB.CONNECTION"
oAdoConn.Provider = "SQLOLEDB"
oAdoConn.Connectionstring = "user ID = adegaeta;initial Catelog = ISD_Deals;Data Source=CGIDEVW2K;Connect Timeout = 60"
oADOConn.Open
** step #1
** copy the deal information to the menu section of this new program
IF oADOConn.State <> 1 then
Messagebox("Error Connecting to Data Source=CGIDEVW2K,
Aborting ISD Install", 64, "Notice"
oADOConn.Close
oADOConn = 0
CLOSE DATABASES
CLOSE ALL
RELEASE ALL
RETURN
ENDIF
The connection is established however when I perform the following recordset code I get the infamous
"OLE Idispatch exception code 0 from Microsoft OLE DB Provider for SQL Server: Invalid Object Name "tblISDDealInfo"
ON ERROR
SET STEP ON
oADORs = CREATEOBJECT("ADODB.Recordset"
oADORs.ActiveConnection = oADOConn
oADORs.Source = "Select * from tblISDDealInfo"
oADORs.CursorType = 2
oADORs.LockType = 3
oADORs.Open
Do anyone have any idea what could be causing this problem. I can use Enterprise manager and perform queries, data access, etc from my workstation. But why is the code returning this error? I cannot seem to trace why. I have changed cursor types, lock types, and still no luck.
Thanks for any help on this.
Art
Art DeGaetano II
Software Developer, MOUS
This is driving me crazy. I have the following code to access as SQL server table:
LOCAL oAdoConn
LOCAL oADORs
oAdoConn = CREATEOBJECT("ADODB.CONNECTION"
oAdoConn.Provider = "SQLOLEDB"
oAdoConn.Connectionstring = "user ID = adegaeta;initial Catelog = ISD_Deals;Data Source=CGIDEVW2K;Connect Timeout = 60"
oADOConn.Open
** step #1
** copy the deal information to the menu section of this new program
IF oADOConn.State <> 1 then
Messagebox("Error Connecting to Data Source=CGIDEVW2K,
Aborting ISD Install", 64, "Notice"
oADOConn.Close
oADOConn = 0
CLOSE DATABASES
CLOSE ALL
RELEASE ALL
RETURN
ENDIF
The connection is established however when I perform the following recordset code I get the infamous
"OLE Idispatch exception code 0 from Microsoft OLE DB Provider for SQL Server: Invalid Object Name "tblISDDealInfo"
ON ERROR
SET STEP ON
oADORs = CREATEOBJECT("ADODB.Recordset"
oADORs.ActiveConnection = oADOConn
oADORs.Source = "Select * from tblISDDealInfo"
oADORs.CursorType = 2
oADORs.LockType = 3
oADORs.Open
Do anyone have any idea what could be causing this problem. I can use Enterprise manager and perform queries, data access, etc from my workstation. But why is the code returning this error? I cannot seem to trace why. I have changed cursor types, lock types, and still no luck.
Thanks for any help on this.
Art
Art DeGaetano II
Software Developer, MOUS