I seem to be having an unresolvable problem with an ASP page (darned
typeless scripting engines) and JET datatypes. Don't ask why we are
using JET, let's just say it has something to do with LEGACY CRAP used
by hundreds of dealers scattered over the US.
The MDB has two boolean fields and when trying to add new records with
the INSERT INTO execute method, it dies.
All works well with strings, but not with booleans.
Booleans are retrieved from the WebPage with ASP using:
strTaxable=request.form("Taxable")
These values can be 0 and 1.
Then we use :
set objparam=cm.createparameter(, adBoolean, , , cbool(strTaxable))
cm.parameters.append objparam
Crashes every time - no error number, just a vague error message that
there is a syntax error in the JET INSERT INTO statement...
However, the same code more or less works using the ODBDC drivers -
which we are trying to avoid.
Any ideas?
Dr. Know 4 1433
Just a guess, but instead of using cbool(strTaxTable) try cInt(strTaxTable).
"Dr. Know" <Dr****@electron.com> wrote in message
news:8u********************************@4ax.com...
I seem to be having an unresolvable problem with an ASP page (darned
typeless scripting engines) and JET datatypes. Don't ask why we are
using JET, let's just say it has something to do with LEGACY CRAP used
by hundreds of dealers scattered over the US.
The MDB has two boolean fields and when trying to add new records with
the INSERT INTO execute method, it dies.
All works well with strings, but not with booleans.
Booleans are retrieved from the WebPage with ASP using:
strTaxable=request.form("Taxable")
These values can be 0 and 1.
Then we use :
set objparam=cm.createparameter(, adBoolean, , , cbool(strTaxable))
cm.parameters.append objparam
Crashes every time - no error number, just a vague error message that
there is a syntax error in the JET INSERT INTO statement...
However, the same code more or less works using the ODBDC drivers -
which we are trying to avoid.
Any ideas?
Dr. Know
Dr. Know wrote: I seem to be having an unresolvable problem with an ASP page (darned typeless scripting engines) and JET datatypes. Don't ask why we are using JET, let's just say it has something to do with LEGACY CRAP used by hundreds of dealers scattered over the US.
The MDB has two boolean fields and when trying to add new records with the INSERT INTO execute method, it dies.
All works well with strings, but not with booleans.
Booleans are retrieved from the WebPage with ASP using:
strTaxable=request.form("Taxable") These values can be 0 and 1.
Then we use :
set objparam=cm.createparameter(, adBoolean, , , cbool(strTaxable)) cm.parameters.append objparam
Crashes every time - no error number, just a vague error message that there is a syntax error in the JET INSERT INTO statement...
However, the same code more or less works using the ODBDC drivers - which we are trying to avoid.
Any ideas?
Dr. Know
The values for the Yes/No field in Access are either 0 or -1. Is
Request.Form("taxable") a checkbox? If it is, then no value will be
passed if it is unchecked.
Morris
Dr. Know wrote: I seem to be having an unresolvable problem with an ASP page (darned typeless scripting engines) and JET datatypes. Don't ask why we are using JET, let's just say it has something to do with LEGACY CRAP used by hundreds of dealers scattered over the US.
The MDB has two boolean fields and when trying to add new records with the INSERT INTO execute method, it dies.
All works well with strings, but not with booleans.
Booleans are retrieved from the WebPage with ASP using:
strTaxable=request.form("Taxable") These values can be 0 and 1.
Then we use :
set objparam=cm.createparameter(, adBoolean, , , cbool(strTaxable)) cm.parameters.append objparam
There is no reason to use a Command object unless you are executing a
parameterized dynamic sql statement. Could we see a little more code please?
just the code used to populate and run the Command parameters and settings -
we don't need to see any html. Crashes every time - no error number, just a vague error message that there is a syntax error in the JET INSERT INTO statement...
However, the same code more or less works using the ODBDC drivers - which we are trying to avoid.
This sounds like an issue with a reserved keyword. Are you executing a
parameterized dynamic sql statement? Or a saved parameter query?
Check your field names against the list of reserved keywords found here: http://www.aspfaq.com/show.asp?id=2080
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows [MVP] said: This sounds like an issue with a reserved keyword. Are you executing a parameterized dynamic sql statement? Or a saved parameter query?
Check your field names against the list of reserved keywords found here: http://www.aspfaq.com/show.asp?id=2080
You were right on the money!
I discovered the problem some time after I posted the original plea
for help. Removed fields one at a time until the bad one popped up.
What a pain...
Discovered the field name [Password] in the original table - which
cannot be re-designed.
The list you supplied the link to has taken up permanent residence in
my ever growing collection of bizarre errata.
This stuff is support work for an antiquated X-base accounting system
which still has no GUI, and uses Telnet for communication with the
outside world. The tables cannot be changed or redesigned.
Personally, I'd rather see them using a comprehensive SQL solution...
They've already added 3rd party online ordering systems, reporting
systems, etc. It's One Big Kludge. cha-ching...
Now if I could just get Provider=vfpoledb;Data Source=C:\xxx\xxxx\"
to work in ASP. Works in Access and VB, but not ASP. :-|
Thanks,
Greg
Dr. Know This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Roman Suzi |
last post by:
Just a thought. Why cmp() returns -1,0,1 while comparison
results are False and True? Isn't it logical step to add
Less, Equal and More?
>>> cmp(1,2)
Less
>>> cmp(1,-1)
More
>>> cmp(1,1)...
|
by: Gerrit Holl |
last post by:
Hi,
is it proper to compare booleans? It is possible, of course, because
they're compatible with numbers, but booleans aren't truly numbers. I'm
tempted to write:
return cmp(self.extends,...
|
by: Martin Herbert Dietze |
last post by:
Hello,
I just stumbled across a nasty bug caused by default arguments
and expressions of type int or pointer accepted as bool in
function parameter lists like:
| void func1 (int foo, bool...
|
by: Christopher Benson-Manica |
last post by:
I have a situation where I have many (more than 32) boolean flags:
var foo=true;
var bar=false;
var baz=false;
// etc.
At various points in the script, these flags may be set or unset....
|
by: Dune |
last post by:
How do I compare a boolean with Nothing?
I can't say "If boolVar Is Nothing" because a boolean is
not a reference type, but "If boolVar = Nothing" always
seems to return true, even if the...
|
by: chech |
last post by:
Possible to have array of booleans?
Dim b1 As Boolean, b2 As Boolean, b3 As Boolean
Dim obj() As Object = {b1, b2, b3}
dim v As Object
For Each v In obj
v = True
Next
This does not work. ...
|
by: John Dann |
last post by:
This question is just for my education as there are some simple and
obvious workarounds, but...
I have an array of Booleans that I need to export to a text file.
Currently the Boolean values are...
|
by: mathieu |
last post by:
Hi,
I was trying to make an entry in a std::map be stored more
efficiently. The struct contained 3 booleans discribing it's property,
so I am trying to make it as compact as possible.
Using a...
|
by: SiJP |
last post by:
Hi,
My vb.net project sends an Input object to a webservice and retrieves
a Results object.
The webservice is maintained by a third party, and is pretty huge.
I am using the following...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |