[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re[2]: [cobalt-users] ASP and MYSQL
- Subject: Re[2]: [cobalt-users] ASP and MYSQL
- From: COMPUTICA <cobalt@xxxxxxxxxxxxxxxxxx>
- Date: Fri Feb 21 08:02:01 2003
- Organization: The COMPUTICA Group of Companies, Inc.
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
On Thursday, February 20, 2003, 9:01:41 PM, Brian wrote:
>>when i create the dsn it creates it perfect, when testing i receive this
>>error
>>
>>server - default
>>Test DSN - TuCaracas
>>
>>Test connecton failed
>>
>>Error: -2147418113
>>Description: Can not load OBDC driver
>>
>>What should i do, i dont want to loose this client lol, please help
BR> Try using a DSN less connection string.
BR> Something like this should work:
BR> <%
BR> Dim connMyConnection
BR> connMyConnection = "Driver={MySQL}; SERVER=www.mydomain.com;
BR> DATABASE=MyDatabaseName; UID=myusername; PASSWORD=mypassword"
%>>
BR> Brian
I had the same problem, and your code has helped solve my DNS
connection to the MySQL database.
Is it possible to send me the continuation of the code to show me how to
execute queries on the database? The problem right now is I can no longer use
my_conn.execute (or something similar) to execute the query anymore. It's
giving me a runtime error.
I have the following code in my file right now:
Dim connMyConnection
connMyConnection = "Driver={MySQL}; SERVER=localhost; DATABASE=dbname;
UID=username; PASSWORD=password"
strSQL = "SELECT * FROM main_content_entry"
How do I execute strSQL in the new code with connMyConnection?
It used to be like:
my_conn.Open "DNS=cobalt"
strSQL = "SELECT * FROM main_content_entry"
Set rs = my_conn.Execute(strSQL) <-- here is the execution
In summary the code you supplied did solve the database connection problem,
but now I am stuck on how to get the result out of the database.
Thanks.
Ryan