Database results wizard and ChiliSoft ASP with MySQL database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using FrontPage 2002 on an ISP running MySQL database, ChiliSoft ASP and
Linux. I created an input form and a results table using the database
results wizard.

The wizard generates the SQL query as
fp_sQry="SELECT * FROM Reqmnts WHERE (Retailer = '::Retailer::')"
This is evaluated as bad SQL by MySQL (database results error message)
MySQL appears to be looking for the following code
="SELECT * FROM Reqmnts WHERE Retailer = "Retailer""
How do I get FrontPage to permit double quotes within quotes?
I have run a test by coding in
response.write Request.Form("Retailer") and the server writes out the name
entered in the Form box

If I use a custom query where I specify a specific value within the Column
Retailer, the the code is generated correctly and everything works.
For example,
fp_sQry="SELECT * FROM Reqmnts WHERE (Retailer = 'CVS')"
works correctly.
 
You'll have to learn to hand code or use the custom query function.

The FP database components are design to generate VBScript that works with both Access or MS SQL
server.

The code is not incorrect, different databases requires certain things to be written differently,
this even applies between querying Access and MS SQL server, where both can support using ::
instead of " or '

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Thanks for the suggestion, the custom query function returns the same results
because it inserts the ::

Is there any way to instruct FP and the VBScript editor to use ' or some
other character in place of " for enclosing the QRY string that is generated
by FP?
 
No, the query string has to be enclosed in double quotes, at least every VBScript example I have
ever seen use " quotes.

You can't change the method FP uses to write VBScript. This is when you need to learn to hand code,
and you will also find that once you do this, you will have a lot more flexibility and options, plus
a lot less code on a page.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Actually, you can try changing the following files under the _fpclass folder:

fpdblib.inc
fpdbrgn1.inc
fpdbrgn2.inc

However FP may at some point overwrite any changes you make to these files.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Back
Top