Frontpage and MYSQL

R

Ron Filipek

I am trying to test a web page locally. I have created a request page
asking for an ID/password. I post that information forward and look
it up against a mysql table. The value is in the table, because I can
hard code the value and get a hit. The sql is very simple (I assume
that the :: is the way FP indicates a hidden field passed forward)

fp_sQry="SELECT * FROM login WHERE username=::username::;"


and the error is

Description: [MySQL][ODBC 3.51 Driver][mysqld-4.0.14-max-debug]You
have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near '
pvalentine' at line 1
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

Any thoughts that will get me past this error?

Thanks

Ron
 
J

Jim Buyens

Try putting apostrophes around ::username::, as in:

fp_sQry="SELECT * FROM login WHERE
username='::username::';"

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
P

Peter Taurins

Try:

"SELECT * FROM member WHERE email='$username'";

Your variable should be $ prefixed assuming you have:

$username = $_POST["username"] ;

Peter.

Jim Buyens said:
Try putting apostrophes around ::username::, as in:

fp_sQry="SELECT * FROM login WHERE
username='::username::';"

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------

-----Original Message-----
I am trying to test a web page locally. I have created a request page
asking for an ID/password. I post that information forward and look
it up against a mysql table. The value is in the table, because I can
hard code the value and get a hit. The sql is very simple (I assume
that the :: is the way FP indicates a hidden field passed forward)

fp_sQry="SELECT * FROM login WHERE username=::username::;"


and the error is

Description: [MySQL][ODBC 3.51 Driver][mysqld-4.0.14-max- debug]You
have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near '
pvalentine' at line 1
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

Any thoughts that will get me past this error?

Thanks

Ron
.
 
P

Peter Taurins

OK I think I went mad sorry.
That would be for a PHP query.
Oops.
Apologies.

Peter Taurins said:
Try:

"SELECT * FROM member WHERE email='$username'";

Your variable should be $ prefixed assuming you have:

$username = $_POST["username"] ;

Peter.

Jim Buyens said:
Try putting apostrophes around ::username::, as in:

fp_sQry="SELECT * FROM login WHERE
username='::username::';"

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------

-----Original Message-----
I am trying to test a web page locally. I have created a request page
asking for an ID/password. I post that information forward and look
it up against a mysql table. The value is in the table, because I can
hard code the value and get a hit. The sql is very simple (I assume
that the :: is the way FP indicates a hidden field passed forward)

fp_sQry="SELECT * FROM login WHERE username=::username::;"


and the error is

Description: [MySQL][ODBC 3.51 Driver][mysqld-4.0.14-max- debug]You
have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near '
pvalentine' at line 1
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

Any thoughts that will get me past this error?

Thanks

Ron
.
 
R

Ron Filipek

The idea of the single quotes did not work. It used the value
::username:: as teh lookup value against the table rather than the
data passed in the POST. I am going to attempt to display the data
posted to the page tonight. I have been reading user group info on
REasponse.Write and will try this to see what is being passed. (Told
you I am pretty new to this.)

Thanks for the responses.

Ron

----------------------------------------------------------------------

Peter Taurins said:
OK I think I went mad sorry.
That would be for a PHP query.
Oops.
Apologies.

Peter Taurins said:
Try:

"SELECT * FROM member WHERE email='$username'";

Your variable should be $ prefixed assuming you have:

$username = $_POST["username"] ;

Peter.

Jim Buyens said:
Try putting apostrophes around ::username::, as in:

fp_sQry="SELECT * FROM login WHERE
username='::username::';"

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------


-----Original Message-----
I am trying to test a web page locally. I have created a request page
asking for an ID/password. I post that information forward and look
it up against a mysql table. The value is in the table, because I can
hard code the value and get a hit. The sql is very simple (I assume
that the :: is the way FP indicates a hidden field passed forward)

fp_sQry="SELECT * FROM login WHERE username=::username::;"


and the error is

Description: [MySQL][ODBC 3.51 Driver][mysqld-4.0.14-max- debug]You
have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near '
pvalentine' at line 1
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

Any thoughts that will get me past this error?

Thanks

Ron
.
 
R

Ron Filipek

OK, I think that the problem is with the SQL syntax fgenerated from
frontpage. I am a little stumped here because I started with the
orignal syntax of
SELECT * FROM login WHERE username=::Username::;

I can perform a response.write against the posted data and get name,

However, the error message would seem to indicate that there is a
balnk or null value causing the statement to error. I have tried
multiple combinations of single and double quotes. When I substitute
a set value "rfilipek", the query works. I have not seen the ::
notation before. Is this a frontpage notation and is it correct?

Ron

-------------------------------------------------------------------------
The idea of the single quotes did not work. It used the value
::username:: as teh lookup value against the table rather than the
data passed in the POST. I am going to attempt to display the data
posted to the page tonight. I have been reading user group info on
REasponse.Write and will try this to see what is being passed. (Told
you I am pretty new to this.)

Thanks for the responses.

Ron

----------------------------------------------------------------------

Peter Taurins said:
OK I think I went mad sorry.
That would be for a PHP query.
Oops.
Apologies.

Peter Taurins said:
Try:

"SELECT * FROM member WHERE email='$username'";

Your variable should be $ prefixed assuming you have:

$username = $_POST["username"] ;

Peter.

Try putting apostrophes around ::username::, as in:

fp_sQry="SELECT * FROM login WHERE
username='::username::';"

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------


-----Original Message-----
I am trying to test a web page locally. I have created a request page
asking for an ID/password. I post that information forward and look
it up against a mysql table. The value is in the table, because I can
hard code the value and get a hit. The sql is very simple (I assume
that the :: is the way FP indicates a hidden field passed forward)

fp_sQry="SELECT * FROM login WHERE username=::username::;"


and the error is

Description: [MySQL][ODBC 3.51 Driver][mysqld-4.0.14-max- debug]You
have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near '
pvalentine' at line 1
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

Any thoughts that will get me past this error?

Thanks

Ron
.
 
K

Kevin Spencer

The SQL Language uses punctuation for data type checking. Values passed that
are related to text columns in a table must be enclosed in single quotes.
Numbers are not delimited with any punctuation. Other data types will vary
from one Database to another. In your case, the data type is text, so you
would enclose the value you pass in single quotes. The ::notation:: you
asked about is FrontPage-specific. It indicates that the token enclosed in
the ::token:: characters is a form field name or Query String name.
FrontPage translates this to the value contained in that Form Field or Query
String item. Therefore, your query should probably read:

SELECT * FROM login WHERE username = '::Username::'

....assuming that you are posting a form with a form field named "Username".

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.


Ron Filipek said:
OK, I think that the problem is with the SQL syntax fgenerated from
frontpage. I am a little stumped here because I started with the
orignal syntax of
SELECT * FROM login WHERE username=::Username::;

I can perform a response.write against the posted data and get name,

However, the error message would seem to indicate that there is a
balnk or null value causing the statement to error. I have tried
multiple combinations of single and double quotes. When I substitute
a set value "rfilipek", the query works. I have not seen the ::
notation before. Is this a frontpage notation and is it correct?

Ron

-------------------------------------------------------------------------
(e-mail address removed) (Ron Filipek) wrote in message
The idea of the single quotes did not work. It used the value
::username:: as teh lookup value against the table rather than the
data passed in the POST. I am going to attempt to display the data
posted to the page tonight. I have been reading user group info on
REasponse.Write and will try this to see what is being passed. (Told
you I am pretty new to this.)

Thanks for the responses.

Ron

----------------------------------------------------------------------

"Peter Taurins" <[email protected]>
wrote in message news: said:
OK I think I went mad sorry.
That would be for a PHP query.
Oops.
Apologies.

in message Try:

"SELECT * FROM member WHERE email='$username'";

Your variable should be $ prefixed assuming you have:

$username = $_POST["username"] ;

Peter.

Try putting apostrophes around ::username::, as in:

fp_sQry="SELECT * FROM login WHERE
username='::username::';"

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------


-----Original Message-----
I am trying to test a web page locally. I have created a request page
asking for an ID/password. I post that information forward and look
it up against a mysql table. The value is in the table, because I can
hard code the value and get a hit. The sql is very simple (I assume
that the :: is the way FP indicates a hidden field passed forward)

fp_sQry="SELECT * FROM login WHERE username=::username::;"


and the error is

Description: [MySQL][ODBC 3.51 Driver][mysqld-4.0.14-max- debug]You
have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near '
pvalentine' at line 1
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

Any thoughts that will get me past this error?

Thanks

Ron
.
 
R

Ron Filipek

I believe that I tried that combination, but I will try again. When I
display the field using the Response.Write Request.Form(username)
command , I get the result of "rfilipek,", and I am also trying to
understand where the , came from.
------------------------------------------------------------------
Kevin Spencer said:
The SQL Language uses punctuation for data type checking. Values passed that
are related to text columns in a table must be enclosed in single quotes.
Numbers are not delimited with any punctuation. Other data types will vary
from one Database to another. In your case, the data type is text, so you
would enclose the value you pass in single quotes. The ::notation:: you
asked about is FrontPage-specific. It indicates that the token enclosed in
the ::token:: characters is a form field name or Query String name.
FrontPage translates this to the value contained in that Form Field or Query
String item. Therefore, your query should probably read:

SELECT * FROM login WHERE username = '::Username::'

...assuming that you are posting a form with a form field named "Username".

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.


Ron Filipek said:
OK, I think that the problem is with the SQL syntax fgenerated from
frontpage. I am a little stumped here because I started with the
orignal syntax of
SELECT * FROM login WHERE username=::Username::;

I can perform a response.write against the posted data and get name,

However, the error message would seem to indicate that there is a
balnk or null value causing the statement to error. I have tried
multiple combinations of single and double quotes. When I substitute
a set value "rfilipek", the query works. I have not seen the ::
notation before. Is this a frontpage notation and is it correct?

Ron
wrote in message news: said:
OK I think I went mad sorry.
That would be for a PHP query.
Oops.
Apologies.

in message Try:

"SELECT * FROM member WHERE email='$username'";

Your variable should be $ prefixed assuming you have:

$username = $_POST["username"] ;

Peter.

Try putting apostrophes around ::username::, as in:

fp_sQry="SELECT * FROM login WHERE
username='::username::';"

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------


-----Original Message-----
I am trying to test a web page locally. I have created a request page
asking for an ID/password. I post that information forward and look
it up against a mysql table. The value is in the table, because I can
hard code the value and get a hit. The sql is very simple (I assume
that the :: is the way FP indicates a hidden field passed forward)

fp_sQry="SELECT * FROM login WHERE username=::username::;"


and the error is

Description: [MySQL][ODBC 3.51 Driver][mysqld-4.0.14-max- debug]You
have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near '
pvalentine' at line 1
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

Any thoughts that will get me past this error?

Thanks

Ron
.
 
K

Kevin Spencer

That sounds suspiciously like you have TWO form fields with the name
"username" - when you have more than one form field with the same name, the
Request Collection stores the values as an array. This could be the source
of your problem.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

Ron Filipek said:
I believe that I tried that combination, but I will try again. When I
display the field using the Response.Write Request.Form(username)
command , I get the result of "rfilipek,", and I am also trying to
understand where the , came from.
------------------------------------------------------------------
"Kevin Spencer" <[email protected]> wrote in message
The SQL Language uses punctuation for data type checking. Values passed that
are related to text columns in a table must be enclosed in single quotes.
Numbers are not delimited with any punctuation. Other data types will vary
from one Database to another. In your case, the data type is text, so you
would enclose the value you pass in single quotes. The ::notation:: you
asked about is FrontPage-specific. It indicates that the token enclosed in
the ::token:: characters is a form field name or Query String name.
FrontPage translates this to the value contained in that Form Field or Query
String item. Therefore, your query should probably read:

SELECT * FROM login WHERE username = '::Username::'

...assuming that you are posting a form with a form field named "Username".

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
wrote in message
wrote
in message Try:

"SELECT * FROM member WHERE email='$username'";

Your variable should be $ prefixed assuming you have:

$username = $_POST["username"] ;

Peter.

Try putting apostrophes around ::username::, as in:

fp_sQry="SELECT * FROM login WHERE
username='::username::';"

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------


-----Original Message-----
I am trying to test a web page locally. I have created a request page
asking for an ID/password. I post that information forward and look
it up against a mysql table. The value is in the table, because I can
hard code the value and get a hit. The sql is very simple (I assume
that the :: is the way FP indicates a hidden field passed forward)

fp_sQry="SELECT * FROM login WHERE username=::username::;"


and the error is

Description: [MySQL][ODBC 3.51 Driver][mysqld-4.0.14-max- debug]You
have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near '
pvalentine' at line 1
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

Any thoughts that will get me past this error?

Thanks

Ron
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top