How to Import Ascii(fixed Length )file in access,Update and Export as ascii file

 I have to make routine for import export text file in access. I want
programmatically import and export routine. There is no comma, tab or
quotation mark in this sample data. Each field has its fixed length and
position. Import this data in access and change price for some items and
export the text file in a same format as we imported. This export file
need to transmit through modem and send the changed price to Point of sale
device(ECR), Electronic cash register.


A: Using LEFT$, Mid$ & STRING So you have fixed length.. that's even better. I assume that all values from one record are on ONE line. You must use the MID$ command to get the proper values... for example the first line of your import file reads: 1234 dentist supplies 12-31-198045.00 fixed length first field = 6 fixed length second field = 15 fixed length third field = 10 fixed length fourth field = 8 the first line you read into the variable strTEMPLINE: strTEMPLINE = 1234 dentist supplies 12-31-198045.00 oke.. follow me now first value is MID(strTEMPLINE,1,6) second value is MID(strTEMPLINE,7,15) third value is MID(strTEMPLINE,16,10) fourth value is MID(strTEMPLINE,27,8) Now you have the four values; just insert them into your db. For exporting you can use the same method: first value = 1234 second value = dentist supplies third value = 12-31-1980 fourth values = 45.00 Use the STRING function to make a fixed length varable: strTEMPLINE = first value + STRING(6-LEN(first value)," ") Return