Reply
Connecting to MySql locally
Old 06-08-2003, 01:02 AM Connecting to MySql locally
Novice Talker

Posts: 9
Location: UK
I am in the process of setting up a forum/message board website.

My hosting (easily.co.uk) has php, mysql etc - everything that’s needed

However I can’t update the mysql database remotely (ODBC, DSN connections), but I can locally through an asp/php script to update the mysql

My hosting company has limited support for php matters but has suggested I use this code:

<%
ConnString = "Driver={MySQL};SERVER=localhost;DATABASE=dbname;U ID=xxx;PWD=yyy"

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open ConnString

%>


But I don’t know where I should include the code and what the file type should be (.php?)

If anyone knows how I can use this code or even knows a better method than this to access the mysql locally, I'd be most grateful of your help.

Thanks
Martin is offline
Reply With Quote
View Public Profile Visit Martin's homepage!
 
When You Register, These Ads Go Away!
Old 06-08-2003, 07:00 AM
conkermaniac's Avatar
The Nutty Moderator

Posts: 1,012
Location: China
Hi Martin,

You should probably include that somewhere near the top of your screen, and the code you have posted above looks like ASP code to me.

Just keep this in mind: <% ... %> is ASP and <? ... ?> is PHP.

Good luck!
__________________
Aimoo - Affordable feature-packed remotely hosted message boards!
conkermaniac is offline
Reply With Quote
View Public Profile Visit conkermaniac's homepage!
 
Old 06-14-2003, 02:33 PM
Novice Talker

Posts: 9
Location: UK
Sorry could you be a bit more specific on what I need to do? like where have I to include the above code?
Martin is offline
Reply With Quote
View Public Profile Visit Martin's homepage!
 
Old 08-25-2003, 05:43 AM
Junior Talker

Posts: 1
Martin,
Did you find a solution to your problem? Because I also have hosting with Easily and am having the same difficulty connecting to my database (from ASP though). The connection string I'm trying to use looks just like the one you have written. All I get is

ADODB.Connection.1 error '80004005'

SQLState: IM002
Native Error Code: 0
[INTERSOLV][ODBC lib] Data source name not found and no default driver specified

If you have any info, would much appreciate a reply.
richardhowell is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Connecting to MySql locally
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12516 seconds with 12 queries