Web Design and Development Forums

another database connection question! asp and mysql

This is a discussion on "another database connection question! asp and mysql" within the ASP Forum section. This forum, and the thread "another database connection question! asp and mysql are both part of the Program Your Website category.


Go Back   Webforumz.com > Program Your Website > ASP Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rating: Thread Rating: 9 votes, 3.67 average.
Old Dec 1st, 2005, 16:24   #1 (permalink)
Junior Member
 
Join Date: Nov 2005
Posts: 18
another database connection question! asp and mysql

Hi all,
I'm trying to remotely access a mysql database and I am experiencing a few problems

Code: Select all
<% 
Dim sConnection, objConn , objRS 
'sConnection = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=newsxml; OPTION=3" 

    sConnection = "Driver={MySQL ODBC 3.51 Driver};" & _ 
        "Server=<82.195.128.88>;" & _ 
        "Database=<johnfog_xml>;" & _ 
        "Uid=<johnfog_xml>;" & _ 
        "Pwd=<wordword>;" 

Set objConn = Server.CreateObject("ADODB.Connection") 
objConn.Open(sConnection) 
Set objRS = objConn.Execute("SELECT Heading, Contents FROM DeHavillandNews")

While Not objRS.EOF
Response.Write objRS.Fields("Heading") & ", " & objRS.Fields("Contents") & "<br>"
'Response.Write & " "
objRS.MoveNext
Wend 
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
and here is the error message:

Quote:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[MySQL][ODBC 3.51 Driver]Unknown MySQL server host '<82.195.128.88>' (11001)
/mysql/index2.asp, line 22
Is there anything obvious thats wrong here?
I'm fairly new to this so any help would be really appreciated.

Thanks all
fogofogo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Dec 1st, 2005, 16:49   #2 (permalink)
Rob
Head Admin & CEO
 
Rob's Avatar
 
Join Date: Jul 2003
Location: bug busting new style
Age: 34
Posts: 3,297
Blog Entries: 7
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: another database connection question! asp and mysql

One fairly obvious thing wrong is that you are using localhost..... localhost is NOT remote... I suspect you need your remote server name in there instead.
__________________
Rob Collyer - SEO Specialist (8 years+)
Owner & Founder of Webforumz.com

My Mrs's site:- Student Midwife Forums

I am currently unavailable for private work
-------------------------------------------------
Rob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Dec 1st, 2005, 18:05   #3 (permalink)
Junior Member
 
Join Date: Nov 2005
Posts: 18
Re: another database connection question! asp and mysql

That line is actually commented out.

I found the error though - it was the <> brackets.

Thanks
fogofogo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Dec 1st, 2005, 18:10   #4 (permalink)
Rob
Head Admin & CEO
 
Rob's Avatar
 
Join Date: Jul 2003
Location: bug busting new style
Age: 34
Posts: 3,297
Blog Entries: 7
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: another database connection question! asp and mysql

Quote:
Originally Posted by fogofogo
That line is actually commented out.

I found the error though - it was the <> brackets.

Thanks
ROFL..... erm... yeah... I'm now pretty embarrased. I shoulda saw that straight-away.
__________________
Rob Collyer - SEO Specialist (8 years+)
Owner & Founder of Webforumz.com

My Mrs's site:- Student Midwife Forums

I am currently unavailable for private work
-------------------------------------------------
Rob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Dec 2nd, 2005, 08:48   #5 (permalink)
Junior Member
 
Join Date: Nov 2005
Posts: 18
Re: another database connection question! asp and mysql

ha! Ah - it was late in the evening mate. Long hard day etc etc.
fogofogo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
database, connection, question, asp, mysql

Thread Tools
Rate This Thread
Rate This Thread:

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Easiest way to open database connection! Monie MSSQL & Access 4 Nov 1st, 2007 07:35
Connection to access database thriftyspider Java, JSP, Cold Fusion 1 Aug 7th, 2007 20:41
PHP n MySQL connection uddin PHP Forum 1 Apr 18th, 2007 06:41
Database connection fogofogo ASP Forum 7 Dec 5th, 2005 14:25
Database Connection Strings Smokie ASP Forum 0 Aug 7th, 2003 09:51



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 19:20.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
SEO by vBSEO 3.1.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59