MS SQL Server, ODBC and PureBasic
Posted: Wed Oct 23, 2013 10:37 pm
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.
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.