Problem with Boolean values in Localized OS

Problem with Boolean values in Localized OS

Post by Uri Rochma » Thu, 24 Oct 2002 18:07:38



I have a 3 tier web site that uses Access database. After
installing the web site on German localized OS I had
problems making it work, and after investigations I've
noticed that whenver I was passing to my VB DLL a boolean
value TRUE and then trying to write the value to the
database it transformed it to the TRUE word in
German "Wahr" and not to a value, and Access didn't accept
it since it expects only True/False.
The Access database is in german also.
Any ideas?
 
 
 

Problem with Boolean values in Localized OS

Post by Parker Zhang [M » Fri, 25 Oct 2002 22:57:56


Hi,

How about passing 1 or 0 into the database?

--
Parker Zhang
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

 
 
 

1. Problem inserting Boolean values into Access using ASP.net

I am trying to Insert information into an Access 2000 database using an
ASP.net webpage.
However, I am having a problem inserting Boolean info into a Yes/No field in
the database.

I have the following code:

'Add to Files Database
 Dim conFiles as OleDbConnection
 Dim strInsert as string
 Dim cmdInsert as OleDbCommand
 conFiles = New OleDbConnection  ("Provider=Microsoft.Jet.OLEDB.4.0;DATA
Source=c:\files\filestest.mdb")
  strInsert = "Insert into Files (First, Filename, Hyperlink) Values (?, ?,
?)"
 cmdInsert = New OleDbCommand (strInsert, conFiles)



 conFiles.Open()
 cmdInsert.ExecuteNonQuery()
 conFiles.Close()

If I just use the fields Filename and Hyperlink then everything works fine
but when I add the field "First" which is the Yes/No field I get the
following error message:

Syntax error in INSERT INTO statement.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Syntax error in INSERT
INTO statement.

Is there a problem with this line of my code?

I have replaced true with false, 1, 0, -1 and they all give the same error
message.

I have trawled all the ASP.net websites looking for answers but haven't
found any examples of how to deal with this problem. Any help with this
would be appreciated.

Derek

2. Stored Procs compile clean after dropping underlying Table!

3. ADO sql select on boolean value problem

4. Envelopes: This MUST be easy.

5. Problem with localizing msdaerxx.dll

6. Oracle Backup by Using ADSM

7. Problem with VB/DAO app on localized version of Windows

8. any informix emulator for windows?

9. Boolean values

10. Boolean Values and Bit Fields

11. MSFlexGrid and boolean values??

12. Formatting Boolean Values in DataGrid

13. Memoryperformance of boolean values