navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

conecting to mysql

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> conecting to mysql
Page: [1]
 
crosscreek

 

Posts: 107
Joined: 2/5/2008
Status: offline

 
conecting to mysql - 2/27/2008 12:38:40   
I am having problems connecting to mysql database properly & wanted some input if I'm doing this correctly. I am using frontpage 2003.

OK in global.asa file I have the following.

'--Project Data Connection
Application("labdatas_ConnectionString") = "DRIVER={MYSQL};SERVER=labdatas@mysql106.mysite4now.com; DATABASE=labdatas; UID=labdatas; PWD=XXXX; Extended Properties='OPTION=16387'"
Application("labdatas_ConnectionTimeout") = 0
Application("labdatas_CommandTimeout") = 0
Application("labdatas_CursorLocation") = 0
Application("labdatas_RuntimeUserName") = ""
Application("labdatas_RuntimePassword") = ""
'--
(Note: origonal password is correct, just took it out for the forum)

I have an openconn.inc file with the following code
<%
Set myConn = server.createObject("ADODB.Connection")
myConn.open(Application("labdatas_ConnectionString"))
%>

I also have a closeconn.inc file with the following code
<%
Set myConn.Close
Set myConn = Nothing
%>

I have a "trial page" set up as to test the connection. open.asp with the following code
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<!-- #include file="openconn.inc" -->
<body>

<%
Set MyResultSet = MyConn.Execute("Select * FROM tblClient")
%>
</body>
<!-- #include file="closeconn.inc" -->
</html>

The error I get when I view it is the following

Microsoft VBScript compilation error '800a03f3'

Expected '='

/closeconn.inc, line 2

Set myConn.Close
----------------^

Now if I take out the <!-- #include file="closeconn.inc" --> line then I get the following message

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[TCX][MyODBC]Access denied for user: 'labdatas@cp252.mysite4now.com' (Using password: YES)

/openconn.inc



I know it's a connection issue, but do I have it set up properly in all aspects (except maybe the server connections is wrong, etc)

I am unable to verify the connection in frontpage database site settings. I also don't have anything in the table yet. Just trying to get a connection first.

Thanks for any help or input



Spooky

 

Posts: 26599
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: conecting to mysql - 2/27/2008 20:49:13   
Remove the set :

<%
myConn.Close
Set myConn = Nothing
%> 


<edit>
Didnt we get MySQL working with the login? or am I thinking of someone else?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to crosscreek)
crosscreek

 

Posts: 107
Joined: 2/5/2008
Status: offline

 
RE: conecting to mysql - 2/27/2008 21:25:51   
Could be me...I was having problems with the sessions & know it was the server side problem. I am using a different host for this project. Thanks for the help....It worked & my open.asp page is blank...no errors...:)

Now I am trying to figure out how to write the code. I understand the concepts, just finding out there are many different ways to write code.

Another Quick question...Trying to add a field to mysql (have tables done, but there are empty)

I have a form with a text box & pointing to the asp page adddog.asp

The adddog.asp page has the following code

<%@ Language=VBScript %>
<% Option Explicit %>
<!-- #include virtual="adovbs.inc" -->
<!-- #include file="openconn.inc" -->
<%
Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "tbldog", myConn, , adLockOptimistic, adCmdTable
objRS.AddNew
objRS("name") = Request.Form("name")
objRS.Update
objRS.Close
Set objRS = Nothing
%>
<!-- #include file="closeconn.inc" -->

I am getting an
Microsoft VBScript compilation error '800a0400'
Expected statement
/adddog.asp, line 5
Option Explicit

But my test page (open.asp) doesn't give me an error.

Am I thinking on the right page. Is the code to update an access database different then a mysql database? I am reading & going by a book that uses access examples, but not sure if it matters.

Thanks

(in reply to Spooky)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> conecting to mysql
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts