Hello everyone,
I've spent the last 24 hours trying to connect to a test database on the server that will be hosting my site. I do know a little MySQL but I'm no expert. To make things easier for all of us I've set up a temporary database on the server.
I think this is all the info you would need to connect (everything I enter here is in the correct case):
Host Name: testdatabase1.db.4485116.hostedresource.com
Database Name: testdatabase1
Database Version: 4.1
Description: just a test database
User Name: testdatabase1
Password: Password1
In the database (testdatabase1) there is one table named: table1
In the table (table1) there is one field [varchar(64)] named: field1
There are two rows of data I have already entered.
When setting up the database I answered yes to:
Quote: "
Allow Direct Database Access?
No Yes
# Note: Databases with External access are located on a separate server than databases without External Access."
When I run the following code I get nothing but zeros and blanks:
mysql_init
strConn as string
iConn as integer
iRows as integer
strConn = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=testdatabase1.db.4485116.hostedresource.com;DATABASE=testdatabase1;UID=testdatabase1;PASSWORD=Password1;OPTION=3;"
mysql_SetDBNullReplaceString "NULL"
iConn = MySQL_SetConnection(strConn)
iRows = MySQL_RunStatement("SELECT * FROM table1")
print "Connected = " + str$(iConn)
print "Rows ", iRows
print "Feild Data: " , MySQL_GetWholeRow(1, "*")
print "Feild Data: " , MySQL_GetWholeRow(2, "*")
wait key
If you manage to connect and read the field please post your code! Thank you!