This is what I'm using to see if I can connect to the database: Code: ' 'to test mySql on server ' 'autodefine "off" openconsole $INCLUDE "sqlext.inc" DEF hEnv,hDBC as UINT DEF hStmt as UINT DEF rc,cbOut as SWORD DEF strConnect[1023],strOut[1023] as ISTRING rc = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, hEnv) IF(rc = SQL_SUCCESS) OR (rc = SQL_SUCCESS_WITH_INFO) SQLSetEnvAttr(hEnv,SQL_ATTR_ODBC_VERSION,SQL_OV_ODBC3,SQL_IS_INTEGER) rc = SQLAllocHandle(SQL_HANDLE_DBC, hEnv, hDbc) IF(rc = SQL_SUCCESS) OR (rc = SQL_SUCCESS_WITH_INFO) 'ODBC initialized try and connect to a database strConnect = "my03.Winhost.com;Initial Catalog=mysql_44925_test;User ID=peaslee;Password=*****;Encrypt=False" rc = SQLDriverConnect(hDbc,NULL,strConnect,LEN(strConnect),strOut,1023,cbout,SQL_DRIVER_COMPLETE) IF rc = SQL_SUCCESS 'connection established and at this point 'SQL can be executed, etc. But we will just report success 'and exit PRINT "Database connection established" SQLDisconnect(hDbc) SQLFreeHandle(SQL_HANDLE_DBC,hDbc) SQLFreeHandle(SQL_HANDLE_ENV,hEnv) ELSE 'error so free the connection handle and environment handle PRINT "Error connecting" SQLFreeHandle(SQL_HANDLE_DBC,hDbc) SQLFreeHandle(SQL_HANDLE_ENV,hEnv) ENDIF ELSE 'error so free the environment handle PRINT "Error allocating connection handle" SQLFreeHandle(SQL_HANDLE_ENV,hEnv) ENDIF ELSE PRINT "Error allocating environment handle" ENDIF PRINT "Any key to close" DO:UNTIL INKEY$ <> "" CloseConsole END The connection fails. I assume it's the connection string, but since I'm new at this, I may be going in the wrong direction. Thanks for any help.
The function returns -1, but that may be just what this software provides. I'll see if I can get a decent error message in case "-1" doesn't mean anything.
Not sure if this will help, but please review this link: http://social.msdn.microsoft.com/Fo.../thread/e8a42c57-da19-40d0-8158-8514947fc820/ I can confirm that the SQL Server Native Client version 10.0 is installed.
Yeah. My colleague and I found some information on the Internet yesterday prior to your response. The API seems to be written in some derivative of C++. I also didn't notice you were trying to connect to a MySQL database. I'm not sure, but the API might only connect to a Microsoft SQL Server database. In any case, have you tried asking for assistance on their forums? I doubt you'll get many responses here since the language is specialized.
Still no luck, but the problem is clearly on my end. There is a feature of Microsoft Access that allows you to create a table that is linked to an SQL server. I got that to work quickly, but I soon realized putting Access on my customers computers would be too expensive.
I am so pleased to finally report success. The folks responsible for my flavor of Basic looked at how the compiler dealt with the commands and were able to provide me with the proper function call parameters. Thanks for the suggestion and for the help.
You're not half as glad as I am Being able to use my favorite development language with an online database opens up all kinds of possibilitities. And with Winhost.com I get a free website to boot!