Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 adodb problem

Author  Topic 

nsrao_1975
Starting Member

13 Posts

Posted - 2004-03-07 : 23:58:28
hi,

i wanted to open a recordset of source table in presourcemain phase.

Function PreSourceMain()
set chkconn =createobject("ADODB.Connection")
set chkrs =createobject("ADODB.Recordset")
chkconn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Password=;Initial Catalog=operations;Data Source=NSR"
chkrs.Open "select * from srtomas", chkconn, adOpenDynamic, adLockOptimistic

PreSourceMain = DTSTransformstat_OK
End Function

but while opening recordset i am getting an error that arguments are of wrongtype or conflicting with eachother..

can any guru help me out here..

thanks in advance

ns rao

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2004-03-08 : 02:10:49
You are trying to use both Windows ("Integrated Security=SSPI") and SQL Authentication ("User ID=sa") in the connection string. Remove one of them.

btw, using the sa account is not recommended for production servers and definitely not with a blank password!

OS
Go to Top of Page
   

- Advertisement -