July 3, 2002 at 9:08 am
I was wondering if anyone could help me out i'm getting an error when I run this activex script here's my code:
Function Main()
Main = DTSTaskExecResult_Success
command()
End Function
Sub command()
dim myConn
dim myRecordset
set myConn = CreateObject("ADODB.Connection")
set myRecordset = CreateObject("ADODB.Recordset")
myConn.Open = "Provider=SQLOLEDB.1; Data Source=(SQLODBC.1); Initial Catalog=Northwind;user id = 'sa';password='' "
mySQLCmdTest = "Select * from master.sysobjects"
myRecordset.Open mySQLCmdTest, myConn
set Flds = myRecordset.Fields
MsgBox Flds
end sub
the error that I get is this:
Error Source: Microsoft OLE DB Provider for SQL Server
Error Description: Error Code: 0
Error Source= Microsoft OLE DB Provider for SQL Server
Error Description: [DBNETLIB][ConnectionOpen{Connect()},]SQL Server does not exist or acces denied.
Error on Line 15
[DBNETLIB][ConnectionOpen{Connect()},]SQL Server does not exist or acces denied.
Please help out thanks
rich
RICHARD KIRMSS
RICHARD KIRMSS
July 3, 2002 at 1:44 pm
I figured this onw out guys, but i'm having another problem. When I run this i'm selecting all from sysobjects. and then i'm
setting Count=myRecord.RecordCount
and the result that i'm getting from this Record count is -1 when in actuality there should be atleast 1100. why is this?
thanks for your help
rich
RICHARD KIRMSS
RICHARD KIRMSS
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply