Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data type changed after converting between Access database and XML

Status
Not open for further replies.

chrislx

Programmer
Oct 17, 2003
32
US
Please help on the following:

There is a field on a table. The data type of the field was defined as Yes/No (It is shown on form as check box).

Then converted to .xml file using Ms access (export the table and saved with .xml). The values of the field is either 1 or 0 in xml file.

If the table is converted back (from xml to ms access table) using XML Spy, the data type is changed to text or number, but not Yes/No.

Does anyone know how to keep the original data type unchanged during the conversion?

Thanks in advance,

chrislx



 
This is just a guess, but it almost sounds as if behind the scenes your field is being changed to a bit value because they are carried as 0 and 1 instead of 0 and -1 as Access boolean fields. Can you possibly change your field type to match what you are getting back? Your checkboxes on the form would still work if you did something like this in the form current code:

YourCheckboxControl.Value = (DataValue = 1)

Good LucK!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top