couple thoughts, could you use a SQL view of the table with field alias and 
attach the view instead?

  ----- Original Message ----- 
  From: Ramsour Mike 
  To: RBASE-L Mailing List 
  Sent: Monday, January 26, 2009 2:42 PM
  Subject: [RBASE-L] - Incorrect syntax near the keyword 'file'


  Greetings:

   

  I am getting the error message noted in the subject line from the Microsoft 
ODBC driver while trying to pull data from a SQL database into R:BASE.  The 
problem is being caused by the fact that there is a field named "FILE" (of all 
things!) in the SQL database.

   

  Using Turbo V-8 I am using the ALIAS option on the SATTACH command to rename 
the "file" column but I still get the error.  The strange thing is that my code 
was working up until the R:Cornucopia update on or about 11/26/2008.  The 
problem exists on both Windows XP and Windows 2000.

   

  I have googled the error message but have not found a solution for this 
particular situation.  I would appreciate any suggestions that would help me 
solve this problem or be able to work around it.

   

  Here is the syntax I am using.  The FNAME field is the one named "FILE" in 
the source SQL database.  The SQL Server table attaches without any problem but 
as soon as I do any queries on it I get the error.

   

  SCONNECT BADATA IDENTIFIED BY <user> <password>

   

  SATTACH COIL USING ID +
  ALIAS ID,STARTDATETIME,NUMBERTXT,PROCESSLINETXT,GRADEINT,GAGE,WIDTHDBL, +
  TYPETXT,LINESPEEDAIM,LENGTHDBL,LINESTOPS,TOTALTIMETXT,DOWNTIMETXT,PATH,FNAME, 
+
  NEEDTOBATCHPRINT,HASBEENARCHIVED,NEEDTOLINEPRINT,FLAG3,FLAG4,FLAG5,FLAG6, +
  FLAG7,NOTEFILE

   

  Thanks

   

  Mike Ramsour

   

   

Reply via email to