i am facing a problem in calling a sp using sql native client provider for SQL Server 2005. I have a stored procedure which return some rows as output. I am calling this sp through my vb application using "DSN=MyDSN; UID=MyUID; PWD=MyPWD" as connection string, in this case i am getting output (row returned from sp). But if i change the connection string and used sql native client provider (Provider : SQLNCLI.1) and specifying server, database name, by calling same sp i am not getting any output. Please note here that the sp has some insert/delete/update statement before the last select and return statement. can somebody tell, if anything needs to be modified in connection string, so that above problem will get solved. Regards, Sandip
What .NET library are you using to connect? Are you using System.Data.SqlClient? Chuck Heinzelman "sandip patil" wrote in message news:3f44d801-2b70-4516-851e-7a1981dba6c0@u36g2000prf.googlegroups.com... > i am facing a problem in calling a sp using sql native client > provider for SQL Server 2005. I have a stored procedure which return > some rows as output. I am calling this sp through my vb application > using "DSN=MyDSN; UID=MyUID; PWD=MyPWD" as connection string, in this > case i am getting output (row returned from sp). But if i change the > connection string and used sql native client provider (Provider : > SQLNCLI.1) and specifying server, database name, by calling same sp i > am not getting any output. > Please note here that the sp has some insert/delete/update statement > before the last select and return statement. > > can somebody tell, if anything needs to be modified in connection > string, so that above problem will get solved. > > Regards, > Sandip
Check http://www.connectionstrings.com/ may shed some light on different types of options you can try. I also alwasy use SET NOCOUNT ON so that rows returned never interferes with my recordset. - Rich "Chuck Heinzelman" wrote: > What .NET library are you using to connect? Are you using > System.Data.SqlClient? > > Chuck Heinzelman > > "sandip patil" wrote in message > news:3f44d801-2b70-4516-851e-7a1981dba6c0@u36g2000prf.googlegroups.com... > > i am facing a problem in calling a sp using sql native client > > provider for SQL Server 2005. I have a stored procedure which return > > some rows as output. I am calling this sp through my vb application > > using "DSN=MyDSN; UID=MyUID; PWD=MyPWD" as connection string, in this > > case i am getting output (row returned from sp). But if i change the > > connection string and used sql native client provider (Provider : > > SQLNCLI.1) and specifying server, database name, by calling same sp i > > am not getting any output. > > Please note here that the sp has some insert/delete/update statement > > before the last select and return statement. > > > > can somebody tell, if anything needs to be modified in connection > > string, so that above problem will get solved. > > > > Regards, > > Sandip > > >