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

 

frontpage and mysql coding question

 
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 >> frontpage and mysql coding question
Page: [1]
 
crosscreek

 

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

 
frontpage and mysql coding question - 2/28/2008 11:05:33   
I need a suggestion of help with coding. I am using frontpage 2003 & mysql database.

I am learning ASP coding & am quickly learning that there's many ways to do things.

I am trying to set up a simple Detail page where someone can see details in a mysql table. I am pretty certain that I am missing a code that will select the table, but anyway I type it I can't seem to get it to work. Below is my base code

The connection works fine, but keep getting a option explicit error. there are many fields in the tbldog, but I am trying to show 1 field (name) at the moment. Just for simplicity sake.

I've tried adding
Dim MySQL the used
MySQL = "SELECT * FROM tbldog" Still no luck. What am I missing?


<%@ Language=VBScript %>
<% Option Explicit %>
<!-- #include virtual="/adovbs.inc" -->
<!-- #include file="openconn.inc" -->
<%
Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "tbldog", myConn, , , adCmdTable
Do White Not objRS.EOF
Response.Write "name: " & objRS("name")
objRS.MoveNext
Loop
objRS.Close
Set objRS = Nothing
myConn.Close
Set myConn = Nothing
%>
rdouglass

 

Posts: 9186
From: Biddeford, ME USA
Status: offline

 
RE: frontpage and mysql coding question - 2/28/2008 12:07:38   
quote:

<% Option Explicit %>


Try turning that off. If you have it being declared in one of your include files, that would cause issues.

Just stick an apostrophe in front temporarily just to confirm.

<% 'Option Explicit %>

That help any?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to crosscreek)
crosscreek

 

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

 
RE: frontpage and mysql coding question - 2/28/2008 12:28:00   
That did work. When I turned it off I found an spelling error, then I saw the dog's name...

When I turned it back on I received the error again. Do I need to have the Option Explicit?

(in reply to rdouglass)
rdouglass

 

Posts: 9186
From: Biddeford, ME USA
Status: offline

 
RE: frontpage and mysql coding question - 2/28/2008 16:07:10   
quote:

Do I need to have the Option Explicit?


Only in rare circumstances have I seen it make a difference. It is usually used in cases where you want to have Public and Private functions or to use the same variable name twice. It basically just requires you to DIM all variables (which is not necessarily a bad thing BTW).

I never use it but you don't want to use it twice. Personally, I'd remove it everywhere and see if anything 'breaks'.

Hope it helps.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to crosscreek)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> frontpage and mysql coding question
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