Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 07-20-2012, 09:37 AM   #1
misternumbertwo
Newly Registered User
 
Join Date: Dec 2008
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
misternumbertwo is on a distinguished road
Yes/No Datatype export to csv file

Hi Everyone,

I have been trying determine why whenever I export and yes/no field from an Access 2003 db to a csv file, all the -1 (True) values are being converted to 1. Is this really the way Access handles this data type? because whenever I try to import it back, I then experience and numeric overflow error. Is there anything wrong with the DB? Is there a way to make sure that it only exports -1 for this datatype?

I do apologize if this has been asked before here. I tried search several times but to no avail.

Thank you in advance everyone!

misternumbertwo is offline   Reply With Quote
Old 07-20-2012, 09:53 AM   #2
boblarson
Smeghead
 
boblarson's Avatar
 
Join Date: Jan 2001
Location: Oregon, USA
Posts: 32,068
Thanks: 97
Thanked 1,828 Times in 1,579 Posts
boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold
Re: Yes/No Datatype export to csv file

Quote:
Originally Posted by misternumbertwo View Post
Hi Everyone,

I have been trying determine why whenever I export and yes/no field from an Access 2003 db to a csv file, all the -1 (True) values are being converted to 1. Is this really the way Access handles this data type? because whenever I try to import it back, I then experience and numeric overflow error. Is there anything wrong with the DB? Is there a way to make sure that it only exports -1 for this datatype?

I do apologize if this has been asked before here. I tried search several times but to no avail.

Thank you in advance everyone!
How are you doing the Import? You should be able to go into the specification and change the data type from Long Integer (the default) for those yes/now fields to Yes/No.




Attached Images
File Type: png importyesno01.png (35.0 KB, 940 views)
File Type: png importyesno02.png (31.3 KB, 806 views)
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
boblarson is offline   Reply With Quote
Old 07-20-2012, 10:52 AM   #3
misternumbertwo
Newly Registered User
 
Join Date: Dec 2008
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
misternumbertwo is on a distinguished road
Re: Yes/No Datatype export to csv file

Quote:
Originally Posted by boblarson View Post
How are you doing the Import? You should be able to go into the specification and change the data type from Long Integer (the default) for those yes/now fields to Yes/No.




Bob,

Thank you for the reply. I haven't thought of this one and will give it a try. I was mainly concerned on the specs of the export rather than the import and I was barking at the wrong tree I guess.

One a side note, does this confirm that Access really converts the -1 yes/no value a 1 during export? Or I just wired the DB the wrong way?

misternumbertwo is offline   Reply With Quote
Old 07-20-2012, 11:01 AM   #4
boblarson
Smeghead
 
boblarson's Avatar
 
Join Date: Jan 2001
Location: Oregon, USA
Posts: 32,068
Thanks: 97
Thanked 1,828 Times in 1,579 Posts
boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold
Re: Yes/No Datatype export to csv file

Quote:
Originally Posted by misternumbertwo View Post
One a side note, does this confirm that Access really converts the -1 yes/no value a 1 during export? Or I just wired the DB the wrong way?
Yes, it does convert them. I did verify that. Not sure why but it does.

__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
boblarson is offline   Reply With Quote
Reply

Tags
csv , datatype

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
export to csv file louisa Forms 2 06-24-2012 07:40 AM
Export to DBF file fenhow Modules & VBA 4 11-11-2009 02:23 AM
Export file Name jquickuk Modules & VBA 3 04-22-2009 03:36 AM
Adding a date before file extension on export of text file JohnLee Modules & VBA 2 02-12-2008 06:44 AM
File Export Dpecification deletes file bauer Modules & VBA 8 09-17-2003 10:48 AM




All times are GMT -8. The time now is 01:14 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World