Originally posted by thepip3r
Does anyone have an example query to run against an slx db? I'm using:
Sub SLX_Test() Set objConn = CreateObject("ADODB.Connection") Set objCmd = CreateObject("ADODB.Command") Set objRS = CreateObject("ADODB.Recordset") objConn.ConnectionString = "Provider=SLXOLEDB.1;Integrated Security=True;Initial Catalog=slxcat;Data Source=myslxserver;Extended Properties=PORT=1706;LOG=ON;Location=;Mode=ReadWrite"
objCmd.CommandText = "SELECT * FROM TICKET WHERE TICKETID='001-00-025850'"
objRS.Open objCmd While Not objRS.EOF MsgBox objRS("AREA") objRS.MoveNext Wend
objRS.Close objConn.Close Set objRS = Nothing Set objCmd = Nothing Set objConn = Nothing End Sub
But I get an error: Run-time error '3709': The connection cannot be used to perform this operation. It is either closed or invalid in this context. TIA |