TeleFlow Forums
http://teleflow.org/phpbb/

error retriving a database
http://teleflow.org/phpbb/viewtopic.php?f=10&t=225
Page 1 of 1

Author:  netscon [ Mon Feb 28, 2005 2:12 pm ]
Post subject: 

hi, <br>Im reading a database but there are 2 fields that i have conflict with one is DATE and the other is TIME because those are system variables and theres an error. <br>There are more than one hundred fields like to try SELECT f1, f2, ... is there other solution?, <br>Im using a TopSpeed database with Clarion. <br> <br>here is part of the log file <br> <br>Feb 28 14:14:32.81: Setting global variable '@FECHFI' to '' <br>Feb 28 14:14:32.81: Setting global variable '@CHCD' to '' <br>Feb 28 14:14:32.81: Setting global variable '@USER$' to '' <br>Feb 28 14:14:32.81: ERROR: '@DATE' is a system variable <br>Feb 28 14:14:32.81: Failed to set variable '@Date'. <br>Feb 28 14:14:32.81: FAILURE <br>Feb 28 14:14:32.82: [2] FINISH

Author:  Chris [ Wed Mar 02, 2005 6:40 pm ]
Post subject: 

You have to alias them. It is the only option. <br>(So, you must do something like: <br>SELECT <br> date AS MY_DATE, <br> time AS MY_TIME <br>FROM <br> table <br>) <br> <br>A couple of things to consider: <br> <br>1) I understand that the table has many fields, but are you actually using them all? Could you not have a short list of just the fields you need? <br>(For example: <br>SELECT <br> f1, <br> f2, <br> f3, <br> date AS MY_DATE <br>WHERE <br>etc. <br>) <br> <br>2) Do a describe of the table and output it to a text file. Use that to actually reference every field in the table, changing date and time as above. Since a describe does most of the work for you, this isn't too bad. <br> <br>3) If you have control over the table, and it isn't required that the fields be named date and time, change the field names. <br> <br>You will probably also have a problem with the @USER$ variable. You won't be able to use it in your application, as it shouldn't be a valid variable name...

Author:  netscon [ Wed Mar 02, 2005 6:58 pm ]
Post subject: 

ok <br>Thanks Chris

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/