Strange Error

Strange Error

am 16.12.2004 22:04:35 von H8ids

Using ActivePDF Toolkit with a website.

The site allows a user to submit information to a database, search, view and
edit it. Now I want to add the option to save in PDF format after a search
has been completed.

Presently I have the search results populating a drop down box from which
the user is allow to select one option then pres the "Create PDF" button
which should call ActivePDF Toolkit to generate a PDF from the related
database record. BUT... I get this following error instead. It doesn't make
sense in relation to the project; I compared the error code with
www.aspfaq.com

"Error Type:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
/regweb/filldb.asp, line 80"


Line 80 is
Set oRS = oDBConn.Execute(sSQL)

David

Re: Strange Error

am 16.12.2004 22:22:48 von Tim Williams

Post the value of "sSQL".

Most likely you are querying a numeric field with a string value or
vice-versa.

Tim.


"H8ids" wrote in message
news:eWDqaL74EHA.2016@TK2MSFTNGP15.phx.gbl...
> Using ActivePDF Toolkit with a website.
>
> The site allows a user to submit information to a database, search, view
and
> edit it. Now I want to add the option to save in PDF format after a search
> has been completed.
>
> Presently I have the search results populating a drop down box from which
> the user is allow to select one option then pres the "Create PDF" button
> which should call ActivePDF Toolkit to generate a PDF from the related
> database record. BUT... I get this following error instead. It doesn't
make
> sense in relation to the project; I compared the error code with
> www.aspfaq.com
>
> "Error Type:
> Microsoft JET Database Engine (0x80040E07)
> Data type mismatch in criteria expression.
> /regweb/filldb.asp, line 80"
>
>
> Line 80 is
> Set oRS = oDBConn.Execute(sSQL)
>
> David
>
>

Re: Strange Error

am 16.12.2004 23:14:15 von H8ids

Tim

Here is the value of sSQL

sSQL = "Select Key, Name, Address, Semester From Results where Key = '" &
sKey & "';"


I think I understand part of the problem now. I've been trying to get
records from the database by identifying the "Key" column in Access. Thus
identifying a numeric field. But I don't understand why this would be a
problem. ASPfaq identifies the issue to be a malformed date or the improper
use of delimiters; I'm not using dates.
I have since changed the value of sSQL to:

sSQL = "Select Key, Name, Address, Semester From Results where Address = '"
& sAddress & "';"


Now I have mixed results. A new error is appearing along with a "Save as"
window (I consider this to be a step forward!! :) ):


"No Records returned, make sure your SQL statement returns records"


I don't know why it is failing to return the full record. My ActivePDF
template fields do match the names of the database fields.

David



"Tim Williams" wrote in message
news:u1QklV74EHA.3388@TK2MSFTNGP15.phx.gbl...
> Post the value of "sSQL".
>
> Most likely you are querying a numeric field with a string value or
> vice-versa.
>
> Tim.
>
>
> "H8ids" wrote in message
> news:eWDqaL74EHA.2016@TK2MSFTNGP15.phx.gbl...
>> Using ActivePDF Toolkit with a website.
>>
>> The site allows a user to submit information to a database, search, view
> and
>> edit it. Now I want to add the option to save in PDF format after a
>> search
>> has been completed.
>>
>> Presently I have the search results populating a drop down box from which
>> the user is allow to select one option then pres the "Create PDF" button
>> which should call ActivePDF Toolkit to generate a PDF from the related
>> database record. BUT... I get this following error instead. It doesn't
> make
>> sense in relation to the project; I compared the error code with
>> www.aspfaq.com
>>
>> "Error Type:
>> Microsoft JET Database Engine (0x80040E07)
>> Data type mismatch in criteria expression.
>> /regweb/filldb.asp, line 80"
>>
>>
>> Line 80 is
>> Set oRS = oDBConn.Execute(sSQL)
>>
>> David
>>
>>
>
>

Re: Strange Error

am 16.12.2004 23:31:10 von reb01501

H8ids wrote:
> Tim
>
> Here is the value of sSQL
>
> sSQL = "Select Key, Name, Address, Semester From Results where Key =
> '" & sKey & "';"
>

No, that is not the value of sSQL. That is the vbscript statement that is
supposed to assign the value to sSQL. To see the value, use

response.write sSQL

>
> I think I understand part of the problem now. I've been trying to get
> records from the database by identifying the "Key" column in Access.
> Thus identifying a numeric field. But I don't understand why this
> would be a problem. ASPfaq identifies the issue to be a malformed
> date or the improper use of delimiters; I'm not using dates.
> I have since changed the value of sSQL to:
>
> sSQL = "Select Key, Name, Address, Semester From Results where
> Address = '" & sAddress & "';"
>
>
> Now I have mixed results. A new error is appearing along with a "Save
> as" window (I consider this to be a step forward!! :) ):
>
>
> "No Records returned, make sure your SQL statement returns records"
>
>
> I don't know why it is failing to return the full record. My ActivePDF
> template fields do match the names of the database fields.
>
> David

You're making the mistake of using dynamic sql. Here are some pointers if
you wish to continue this route, along with the suggestion of a better way
if you are so inclined:

http://groups-beta.google.com/group/microsoft.public.inetser ver.asp.general/msg/713f592513bf333c?hl=en&lr=&ie=UTF-8&oe=U TF-8

Oh wait! The post got truncated! Look at this as well :
http://groups-beta.google.com/group/microsoft.public.inetser ver.asp.db/msg/7d6e8544e2fd6889?oe=UTF-8



Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: Strange Error

am 17.12.2004 05:28:07 von McKirahan

"H8ids" wrote in message
news:eYmCWy74EHA.1400@TK2MSFTNGP11.phx.gbl...
> Tim
>
> Here is the value of sSQL
>
> sSQL = "Select Key, Name, Address, Semester From Results where Key = '" &
> sKey & "';"

[snip]

FYI, "name" is often a reserved word; try "[name]" instead.

Re: Strange Error

am 17.12.2004 15:08:03 von H8ids

I placed response.write sSQL into the page code and received the following
information:

"Select Key, Name, Address, Semester From Results where Address = '';No
Records returned, make sure your SQL statement returns records"

David




"Bob Barrows [MVP]" wrote in message
news:uHMU5774EHA.1524@TK2MSFTNGP09.phx.gbl...
> H8ids wrote:
>> Tim
>>
>> Here is the value of sSQL
>>
>> sSQL = "Select Key, Name, Address, Semester From Results where Key =
>> '" & sKey & "';"
>>
>
> No, that is not the value of sSQL. That is the vbscript statement that is
> supposed to assign the value to sSQL. To see the value, use
>
> response.write sSQL
>
>>
>> I think I understand part of the problem now. I've been trying to get
>> records from the database by identifying the "Key" column in Access.
>> Thus identifying a numeric field. But I don't understand why this
>> would be a problem. ASPfaq identifies the issue to be a malformed
>> date or the improper use of delimiters; I'm not using dates.
>> I have since changed the value of sSQL to:
>>
>> sSQL = "Select Key, Name, Address, Semester From Results where
>> Address = '" & sAddress & "';"
>>
>>
>> Now I have mixed results. A new error is appearing along with a "Save
>> as" window (I consider this to be a step forward!! :) ):
>>
>>
>> "No Records returned, make sure your SQL statement returns records"
>>
>>
>> I don't know why it is failing to return the full record. My ActivePDF
>> template fields do match the names of the database fields.
>>
>> David
>
> You're making the mistake of using dynamic sql. Here are some pointers if
> you wish to continue this route, along with the suggestion of a better way
> if you are so inclined:
>
> http://groups-beta.google.com/group/microsoft.public.inetser ver.asp.general/msg/713f592513bf333c?hl=en&lr=&ie=UTF-8&oe=U TF-8
>
> Oh wait! The post got truncated! Look at this as well :
> http://groups-beta.google.com/group/microsoft.public.inetser ver.asp.db/msg/7d6e8544e2fd6889?oe=UTF-8
>
>
>
> Bob Barrows
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>

Re: Strange Error

am 17.12.2004 15:08:56 von H8ids

Will I need to rename the database column too?


"McKirahan" wrote in message
news:rftwd.201464$5K2.94813@attbi_s03...
> "H8ids" wrote in message
> news:eYmCWy74EHA.1400@TK2MSFTNGP11.phx.gbl...
>> Tim
>>
>> Here is the value of sSQL
>>
>> sSQL = "Select Key, Name, Address, Semester From Results where Key = '" &
>> sKey & "';"
>
> [snip]
>
> FYI, "name" is often a reserved word; try "[name]" instead.
>
>

Re: Strange Error

am 17.12.2004 15:34:03 von ten.xoc

> I think I understand part of the problem now. I've been trying to get
> records from the database by identifying the "Key" column in Access. Thus
> identifying a numeric field. But I don't understand why this would be a
> problem. ASPfaq identifies the issue to be a malformed date or the
improper
> use of delimiters; I'm not using dates.

But you have delimiters around a numeric value. Numeric values should not
have delimiters around them, because they're numeric values, not strings.

Also,
(a) as others have noted, Name is a reserved word. Either rename the
database column or surround the name in [brackets] in every single query you
write.
(b) make sure that sKey actually has a value before running the SQL
statement.

--
http://www.aspfaq.com/
(Reverse address to reply.)

Re: Strange Error

am 17.12.2004 15:37:02 von reb01501

So that tells you the problem doesn't it? sKey has no value. Now you need to
determine why that is the case.

Bob Barrows

H8ids wrote:
> I placed response.write sSQL into the page code and received the
> following information:
>
> "Select Key, Name, Address, Semester From Results where Address =
> '';No Records returned, make sure your SQL statement returns records"
>
> David
>
>
>
>
> "Bob Barrows [MVP]" wrote in message
> news:uHMU5774EHA.1524@TK2MSFTNGP09.phx.gbl...
>> H8ids wrote:
>>> Tim
>>>
>>> Here is the value of sSQL
>>>
>>> sSQL = "Select Key, Name, Address, Semester From Results where Key =
>>> '" & sKey & "';"
>>>
>>
>> No, that is not the value of sSQL. That is the vbscript statement
>> that is supposed to assign the value to sSQL. To see the value, use
>>
>> response.write sSQL
>>
>>>
>>> I think I understand part of the problem now. I've been trying to
>>> get records from the database by identifying the "Key" column in
>>> Access. Thus identifying a numeric field. But I don't understand
>>> why this would be a problem. ASPfaq identifies the issue to be a
>>> malformed date or the improper use of delimiters; I'm not using
>>> dates.
>>> I have since changed the value of sSQL to:
>>>
>>> sSQL = "Select Key, Name, Address, Semester From Results where
>>> Address = '" & sAddress & "';"
>>>
>>>
>>> Now I have mixed results. A new error is appearing along with a
>>> "Save as" window (I consider this to be a step forward!! :) ):
>>>
>>>
>>> "No Records returned, make sure your SQL statement returns records"
>>>
>>>
>>> I don't know why it is failing to return the full record. My
>>> ActivePDF template fields do match the names of the database fields.
>>>
>>> David
>>
>> You're making the mistake of using dynamic sql. Here are some
>> pointers if you wish to continue this route, along with the
>> suggestion of a better way if you are so inclined:
>>
>>
http://groups-beta.google.com/group/microsoft.public.inetser ver.asp.general/msg/713f592513bf333c?hl=en&lr=&ie=UTF-8&oe=U TF-8
>>
>> Oh wait! The post got truncated! Look at this as well :
>>
http://groups-beta.google.com/group/microsoft.public.inetser ver.asp.db/msg/7d6e8544e2fd6889?oe=UTF-8
>>
>>
>>
>> Bob Barrows
>> --
>> Microsoft MVP -- ASP/ASP.NET
>> Please reply to the newsgroup. The email account listed in my From
>> header is my spam trap, so I don't check it very often. You will get
>> a quicker response by posting to the newsgroup.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: Strange Error

am 17.12.2004 15:38:10 von reb01501

If you can do that, you should. That will relieve you of the requirement to
surround the name with brackets.

More reserved keywords can be found here:
http://www.aspfaq.com/show.asp?id=2080
Bob Barrows
H8ids wrote:
> Will I need to rename the database column too?
>
>
> "McKirahan" wrote in message
> news:rftwd.201464$5K2.94813@attbi_s03...
>> "H8ids" wrote in message
>> news:eYmCWy74EHA.1400@TK2MSFTNGP11.phx.gbl...
>>> Tim
>>>
>>> Here is the value of sSQL
>>>
>>> sSQL = "Select Key, Name, Address, Semester From Results where Key
>>> = '" & sKey & "';"
>>
>> [snip]
>>
>> FYI, "name" is often a reserved word; try "[name]" instead.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: Strange Error

am 17.12.2004 15:46:24 von McKirahan

"H8ids" wrote in message
news:eZ610HE5EHA.1452@TK2MSFTNGP11.phx.gbl...
> Will I need to rename the database column too?
>
>
> "McKirahan" wrote in message
> news:rftwd.201464$5K2.94813@attbi_s03...
> > "H8ids" wrote in message
> > news:eYmCWy74EHA.1400@TK2MSFTNGP11.phx.gbl...
> >> Tim
> >>
> >> Here is the value of sSQL
> >>
> >> sSQL = "Select Key, Name, Address, Semester From Results where Key = '"
&
> >> sKey & "';"
> >
> > [snip]
> >
> > FYI, "name" is often a reserved word; try "[name]" instead.

No, just enclose them in brackets in your SQL statement.

Re: Strange Error

am 17.12.2004 21:11:52 von H8ids

I'm now able to create a PDF file using ActivePDF. However the template PDF
file is not being populated with the selected database record.
Anyone using ActivePDF who has experienced a similar issue?

David


"H8ids" wrote in message
news:eYmCWy74EHA.1400@TK2MSFTNGP11.phx.gbl...
> Tim
>
> Here is the value of sSQL
>
> sSQL = "Select Key, Name, Address, Semester From Results where Key = '" &
> sKey & "';"
>
>
> I think I understand part of the problem now. I've been trying to get
> records from the database by identifying the "Key" column in Access. Thus
> identifying a numeric field. But I don't understand why this would be a
> problem. ASPfaq identifies the issue to be a malformed date or the
> improper use of delimiters; I'm not using dates.
> I have since changed the value of sSQL to:
>
> sSQL = "Select Key, Name, Address, Semester From Results where Address =
> '" & sAddress & "';"
>
>
> Now I have mixed results. A new error is appearing along with a "Save as"
> window (I consider this to be a step forward!! :) ):
>
>
> "No Records returned, make sure your SQL statement returns records"
>
>
> I don't know why it is failing to return the full record. My ActivePDF
> template fields do match the names of the database fields.
>
> David
>
>
>
> "Tim Williams" wrote in message
> news:u1QklV74EHA.3388@TK2MSFTNGP15.phx.gbl...
>> Post the value of "sSQL".
>>
>> Most likely you are querying a numeric field with a string value or
>> vice-versa.
>>
>> Tim.
>>
>>
>> "H8ids" wrote in message
>> news:eWDqaL74EHA.2016@TK2MSFTNGP15.phx.gbl...
>>> Using ActivePDF Toolkit with a website.
>>>
>>> The site allows a user to submit information to a database, search, view
>> and
>>> edit it. Now I want to add the option to save in PDF format after a
>>> search
>>> has been completed.
>>>
>>> Presently I have the search results populating a drop down box from
>>> which
>>> the user is allow to select one option then pres the "Create PDF" button
>>> which should call ActivePDF Toolkit to generate a PDF from the related
>>> database record. BUT... I get this following error instead. It doesn't
>> make
>>> sense in relation to the project; I compared the error code with
>>> www.aspfaq.com
>>>
>>> "Error Type:
>>> Microsoft JET Database Engine (0x80040E07)
>>> Data type mismatch in criteria expression.
>>> /regweb/filldb.asp, line 80"
>>>
>>>
>>> Line 80 is
>>> Set oRS = oDBConn.Execute(sSQL)
>>>
>>> David
>>>
>>>
>>
>>
>
>

Re: Strange Error

am 18.12.2004 01:19:28 von Bob Lehmann

How is this a "Strange" error?

Bob Lehmann


"H8ids" wrote in message
news:eWDqaL74EHA.2016@TK2MSFTNGP15.phx.gbl...
> Using ActivePDF Toolkit with a website.
>
> The site allows a user to submit information to a database, search, view
and
> edit it. Now I want to add the option to save in PDF format after a search
> has been completed.
>
> Presently I have the search results populating a drop down box from which
> the user is allow to select one option then pres the "Create PDF" button
> which should call ActivePDF Toolkit to generate a PDF from the related
> database record. BUT... I get this following error instead. It doesn't
make
> sense in relation to the project; I compared the error code with
> www.aspfaq.com
>
> "Error Type:
> Microsoft JET Database Engine (0x80040E07)
> Data type mismatch in criteria expression.
> /regweb/filldb.asp, line 80"
>
>
> Line 80 is
> Set oRS = oDBConn.Execute(sSQL)
>
> David
>
>

Re: Strange Error

am 20.12.2004 15:20:01 von H8ids

Bob,

I'm now able to create a PDF file using ActivePDF. However the template PDF
file is not being populated with the selected database record.
Presently, I'm not receiving an error message which is strange; just a blank
screen.
The database field names are identical to the PDF and ASP form.

David


"Bob Lehmann" wrote in message
news:e0yG3bJ5EHA.1396@tk2msftngp13.phx.gbl...
> How is this a "Strange" error?
>
> Bob Lehmann
>
>
> "H8ids" wrote in message
> news:eWDqaL74EHA.2016@TK2MSFTNGP15.phx.gbl...
>> Using ActivePDF Toolkit with a website.
>>
>> The site allows a user to submit information to a database, search, view
> and
>> edit it. Now I want to add the option to save in PDF format after a
>> search
>> has been completed.
>>
>> Presently I have the search results populating a drop down box from which
>> the user is allow to select one option then pres the "Create PDF" button
>> which should call ActivePDF Toolkit to generate a PDF from the related
>> database record. BUT... I get this following error instead. It doesn't
> make
>> sense in relation to the project; I compared the error code with
>> www.aspfaq.com
>>
>> "Error Type:
>> Microsoft JET Database Engine (0x80040E07)
>> Data type mismatch in criteria expression.
>> /regweb/filldb.asp, line 80"
>>
>>
>> Line 80 is
>> Set oRS = oDBConn.Execute(sSQL)
>>
>> David
>>
>>
>
>