Can you please send me the full text of the error generated?
i am also having the same problem, waiting anxiously to get the right solution... you help will highly be appreciated...
OK the simplest way to connect through vb to mssql server is that Step 1. declare a variable of type connection as dim con as new adodb.connectionstep 2. now make the connection string to be passed to this connection variable.like belowcon.open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=master;Data Source=(local)"so this is how to connect to mssql server through vb.i think it will get your work done.
Sorry one thing more i want to add.i have used database name as "master" so you can use your own and also i have given "(local)" as my database server so you can just replace this with the system name or ip of your database server.
gr8. it worked for me and i think it is a very easy way to connect to database.thanks imtiaz.
Can you please send me the full text of the error generated?
ReplyDeletei am also having the same problem, waiting anxiously to get the right solution... you help will highly be appreciated...
ReplyDeleteOK the simplest way to connect through vb to mssql server is that
ReplyDeleteStep 1. declare a variable of type connection as
dim con as new adodb.connection
step 2. now make the connection string to be passed to this connection variable.
like below
con.open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=master;Data Source=(local)"
so this is how to connect to mssql server through vb.
i think it will get your work done.
Sorry one thing more i want to add.
ReplyDeletei have used database name as "master" so you can use your own and also i have given "(local)" as my database server so you can just replace this with the system name or ip of your database server.
gr8. it worked for me and i think it is a very easy way to connect to database.
ReplyDeletethanks imtiaz.