SQL Database results follow up

  • Thread starter Lost but not as much
  • Start date
L

Lost but not as much

Thanks to many of you and this group, I have solved 99% of
my problems. The latest was a corrupt global.asa file.

Only one issue remains.

I have the simplest of queries against a SQL table:

SELECT * FROM database1_fn WHERE (f_docnumber
= ::f_docnumber::)

f_docnumber is the key field in a SQL table. Nulls are
not allowed. The field is configured as Numeric 9(10,0).

This is on a page that allows the user to enter a
f_docnumber to search for in the database. The following
error appears on the page BEFORE any entry is made.

Database Results Error
Description: Line 1: Incorrect syntax near ')'.
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for SQL Server

One or more form fields were empty. You should provide
default values for all form fields that are used in the
query.

If I enter a number, the query works perfectly.

I have tried populating the query with a default value of
a valid f_doccumber but the error remains.

I am assuming that the :: signifies a form search field.

Where else should I be looking?

Thanks
 
S

Stuart

just make your search form a seperate page and have it
post to the asp page with the Query. if you are using the
database results wizard, under criteria, select
f_docnumber as the field you want to search leave the next
box as "equals" and in the next box type in searchdoc and
leave the "use this search form field" checked. When you
get to the last item on the results wizard, uncheck the
box that says "Add Search Form"...then you have to make
the search page.

On your search page make a form with a text box. Name the
textbox "searchdoc". then go to form properties and
select "send to other" . click on the options button and
in the action field type in the name of the page that
contains teh query...docunumber.asp or whatever you called
it and in the Method box select post.

this way the results and the search page are seperate and
you will not see the error that you get before a number is
entered.

Hope this helps

Stu
 
A

Andrew Murray

Lost but not as much said:
Thanks to many of you and this group, I have solved 99% of
my problems. The latest was a corrupt global.asa file.

Only one issue remains.

I have the simplest of queries against a SQL table:

SELECT * FROM database1_fn WHERE (f_docnumber
= ::f_docnumber::)

f_docnumber is the key field in a SQL table. Nulls are
not allowed. The field is configured as Numeric 9(10,0).

This is on a page that allows the user to enter a
f_docnumber to search for in the database. The following
error appears on the page BEFORE any entry is made.

Database Results Error
Description: Line 1: Incorrect syntax near ')'.
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for SQL Server

One or more form fields were empty. You should provide
default values for all form fields that are used in the
query.

If I enter a number, the query works perfectly.

I have tried populating the query with a default value of
a valid f_doccumber but the error remains.

I am assuming that the :: signifies a form search field.

Where else should I be looking?

Thanks

open global.asa and check the database connection string is correct. I've had
that database error come up before and it was because either I hadn't uploaded
the global.asa or the connection string was incorrect, or the database *.mdb was
uploaded in the wrong place. I get confused by the "one or more fields were
empty" - I mean if you have nothing to put in the field, of course it will be
empty!
 

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

Similar Threads


Top