Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



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

Posts: 9
Location: UK
Trades: 0
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
 
 
Register now for full access!
Old 06-08-2003, 06:00 AM
conkermaniac's Avatar
The Nutty Moderator

Posts: 1,012
Location: China
Trades: 0
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!
__________________

Please login or register to view this content. Registration is FREE
- Affordable feature-packed remotely hosted message boards!
conkermaniac is offline
Reply With Quote
View Public Profile
 
Old 06-14-2003, 01:33 PM
Novice Talker

Posts: 9
Location: UK
Trades: 0
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
 
Old 08-25-2003, 04:43 AM
Junior Talker

Posts: 1
Trades: 0
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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.61278 seconds with 12 queries