Here is the code im testing out? why doesnt it work??
it also doesnt provide for user name / password..
it seems no matter what I try here nothing really works for a dynamic connection to a SQL server.. I fail to see why its so hard to create a connection to a server and mess with some data... when data manipulation so easy with just plain .dbf's. Maybe the simple answer im looking for just doesnt exist.
#define ODBC_ADD_DSN 1
#define ODBC_CONFIG_DSN 2
#define ODBC_REMOVE_DSN 3
#define ODBC_ADD_SYS_DSN 4
#define ODBC_CONFIG_SYS_DSN 5
#define ODBC_REMOVE_SYS_DSN 6
#define ODBC_REMOVE_DEFAULT_DSN 7
#define SQL_NO_DATA 100
#define SQL_SUCCESS_WITH_INFO 1
#define SQL_SUCCESS 0
#define SQL_ERROR -1
DECLARE Integer SQLConfigDataSource IN odbccp32.dll Integer, Short, String @, String @
lc_driver = "SQL Server" + CHR(0)
lc_dsn = "dsn=testdsn" + CHR(0) + ;
"server=127.0.0.1" + CHR(0) + ;
"database=tracker" + CHR(0) + ;
"network=DBMSSOCN" + CHR(0) && DBMSSOCN = TCP/IP connection
fResult = SQLConfigDataSource(0, ODBC_ADD_DSN, @lc_driver, @lc_dsn)
IF fResult = -1 OR fResult = 1
* Call the SQLInstallerError API for error Information.
ENDIF
it also doesnt provide for user name / password..
it seems no matter what I try here nothing really works for a dynamic connection to a SQL server.. I fail to see why its so hard to create a connection to a server and mess with some data... when data manipulation so easy with just plain .dbf's. Maybe the simple answer im looking for just doesnt exist.
#define ODBC_ADD_DSN 1
#define ODBC_CONFIG_DSN 2
#define ODBC_REMOVE_DSN 3
#define ODBC_ADD_SYS_DSN 4
#define ODBC_CONFIG_SYS_DSN 5
#define ODBC_REMOVE_SYS_DSN 6
#define ODBC_REMOVE_DEFAULT_DSN 7
#define SQL_NO_DATA 100
#define SQL_SUCCESS_WITH_INFO 1
#define SQL_SUCCESS 0
#define SQL_ERROR -1
DECLARE Integer SQLConfigDataSource IN odbccp32.dll Integer, Short, String @, String @
lc_driver = "SQL Server" + CHR(0)
lc_dsn = "dsn=testdsn" + CHR(0) + ;
"server=127.0.0.1" + CHR(0) + ;
"database=tracker" + CHR(0) + ;
"network=DBMSSOCN" + CHR(0) && DBMSSOCN = TCP/IP connection
fResult = SQLConfigDataSource(0, ODBC_ADD_DSN, @lc_driver, @lc_dsn)
IF fResult = -1 OR fResult = 1
* Call the SQLInstallerError API for error Information.
ENDIF