trying to connect to SQLServer with dblib.lib / dbopen() fails

Gal Rubinstein <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
  I'm trying to setup the correct string to connect to a server on 
localhost (window 7, VC++).

here is the code:

         login = dblogin();
         DBSETLAPP(login, "northwind");
         DBSETLPWD(login, "123123");
         DBSETLUSER(login, "stam");
         dbproc = dbopen(login, "GAL-PC");
         dbloginfree(login);
         dbexit();

as for the data here: I'm trying to use the northwind database on the 
local server.

when I'm using the server management studio, I'm able to login using 
this username and password
the database name is "northwind" and "GAL-PC" is the name of the server 
(and of my computer).

any ideas why dbopen doesn't work, is ther another way of getting the 
correct variables?

thanks,
Gal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.