MS SQL Server, ODBC and PureBasic

Everything else that doesn't fall into one of the other PB categories.
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

MS SQL Server, ODBC and PureBasic

Post by RichAlgeni »

I've just had a requirement to write an interface to Microsoft SQL Server. The easiest way to do this in PureBasic is to create an ODBC DSN (data source name). You do this on the machine which will run the interface, pointing the DSN to the SQL Server machine. The best instructions I've found to create the DSN is here:

http://support.microsoft.com/kb/305599

You then call UseODBCDatabase() in your program.

You call OpenDatabase with the DSN Name as the first parameter, the user name as second, and the password as third. Then just use the PureBasic SQL commands as normal.
swan
Enthusiast
Enthusiast
Posts: 227
Joined: Sat Jul 03, 2004 9:04 am
Location: Sydney Australia
Contact:

Re: MS SQL Server, ODBC and PureBasic

Post by swan »

You may want to also check out ADOmate by Srod. Great for both local and remote connections ...
Post Reply