Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 4 of 4 total |
Export Table Help |
Wed, Jan 31 2007 2:28 AM | Permanent Link |
Sean in Kaz | DBISAM 4 Delphi 7 Pro
I am trying to export a table to a text file. I can do it in the Utilities but not in code. Any help appreciated... In DBYSYS I have EXPORT TABLE gprExport TO "c:\test.txt" DELIMITER ';' WITH HEADERS COLUMNS (RecordNum, Lattitude) Works fine. Note: I need the semi-colon delimited for the next use of the file... In Code I have: tblGPRExport.Close; qryExport.SQL.Clear; With qryExport do begin with SQL do begin add('EXPORT TABLE gprExport TO "c:\test.txt" DELIMITER ";" WITH HEADERS COLUMNS (RecordNum, Lattitude)'); end; qryDelete.execsql end; It doesn't blow up, it just doesn't create the file. I have full permissions etc. etc. Please help, Sean (Kazakhstan) |
Wed, Jan 31 2007 4:43 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Sean
>tblGPRExport.Close; >qryExport.SQL.Clear; >With qryExport do begin > with SQL do begin > add('EXPORT TABLE gprExport TO "c:\test.txt" DELIMITER ";" WITH HEADERS COLUMNS (RecordNum, Lattitude)'); > end; >qryDelete.execsql >end; You make have mistyped in the post but you're not running qryExport Roy Lambert |
Wed, Jan 31 2007 5:30 AM | Permanent Link |
Sean in Kaz | Hi Roy, yes, it was just a typo as I am working from laptop and had to retype it. It apparently doesn't like my use of double-quotes around the semi-colon. It says,: Expected NULL , String expression but
instead found ";" in EXPORT TABLE SQL statement at line 1 Thank you, Sean Sean in Kaz <Sean@HorizonCanada.com> wrote: DBISAM 4 Delphi 7 Pro I am trying to export a table to a text file. I can do it in the Utilities but not in code. Any help appreciated... In DBYSYS I have EXPORT TABLE gprExport TO "c:\test.txt" DELIMITER ';' WITH HEADERS COLUMNS (RecordNum, Lattitude) Works fine. Note: I need the semi-colon delimited for the next use of the file... In Code I have: tblGPRExport.Close; qryExport.SQL.Clear; With qryExport do begin with SQL do begin add('EXPORT TABLE gprExport TO "c:\test.txt" DELIMITER ";" WITH HEADERS COLUMNS (RecordNum, Lattitude)'); end; qryDelete.execsql end; It doesn't blow up, it just doesn't create the file. I have full permissions etc. etc. Please help, Sean (Kazakhstan) |
Wed, Jan 31 2007 5:40 AM | Permanent Link |
Sean in Kaz | Hi Roy, it's been a while since I had to worry about this. I needed two single quotes on each side, instead a double quote on each side of the semi-colon. Thanks a lot...Sean
Sean in Kaz <Sean@HorizonCanada.com> wrote: DBISAM 4 Delphi 7 Pro I am trying to export a table to a text file. I can do it in the Utilities but not in code. Any help appreciated... In DBYSYS I have EXPORT TABLE gprExport TO "c:\test.txt" DELIMITER ';' WITH HEADERS COLUMNS (RecordNum, Lattitude) Works fine. Note: I need the semi-colon delimited for the next use of the file... In Code I have: tblGPRExport.Close; qryExport.SQL.Clear; With qryExport do begin with SQL do begin add('EXPORT TABLE gprExport TO "c:\test.txt" DELIMITER ";" WITH HEADERS COLUMNS (RecordNum, Lattitude)'); end; qryDelete.execsql end; It doesn't blow up, it just doesn't create the file. I have full permissions etc. etc. Please help, Sean (Kazakhstan) |
This web page was last updated on Friday, March 29, 2024 at 03:30 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |