Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2008
Posts: 16
Reputation: mykar_88 is an unknown quantity at this point 
Solved Threads: 0
mykar_88 mykar_88 is offline Offline
Newbie Poster

syntax error

 
0
  #1
Dec 6th, 2008
hi
i'm receiving anerror message while executing this statement.

dr.Execute ("alter table results12 add (Total number,Percentage number,Status char(5))")

error message

run-time error:3292
syntax error in field definition
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 304
Reputation: aktharshaik is an unknown quantity at this point 
Solved Threads: 37
aktharshaik's Avatar
aktharshaik aktharshaik is offline Offline
Posting Whiz

Re: syntax error

 
0
  #2
Dec 6th, 2008
It must be

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. dr.Execute ("alter table results12 add Total number,Percentage number,Status char(5)")

remove the Parenthesis for the Fields list provided.
Regards
Shaik Akthar
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 16
Reputation: mykar_88 is an unknown quantity at this point 
Solved Threads: 0
mykar_88 mykar_88 is offline Offline
Newbie Poster

Re: syntax error

 
0
  #3
Dec 6th, 2008
hi
i tried without parenthesis too
but if the parenthesis is removed,it is showing syntax error in alter statement.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 304
Reputation: aktharshaik is an unknown quantity at this point 
Solved Threads: 37
aktharshaik's Avatar
aktharshaik aktharshaik is offline Offline
Posting Whiz

Re: syntax error

 
0
  #4
Dec 6th, 2008
What is the Database Backend u r using??
Regards
Shaik Akthar
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 304
Reputation: aktharshaik is an unknown quantity at this point 
Solved Threads: 37
aktharshaik's Avatar
aktharshaik aktharshaik is offline Offline
Posting Whiz

Re: syntax error

 
0
  #5
Dec 6th, 2008
It worked for me with VB 6.0 and MS-Access Database.
Regards
Shaik Akthar
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 304
Reputation: aktharshaik is an unknown quantity at this point 
Solved Threads: 37
aktharshaik's Avatar
aktharshaik aktharshaik is offline Offline
Posting Whiz

Re: syntax error

 
0
  #6
Dec 6th, 2008
If SQL Server use the query below

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. dr.Execute "ALTER TABLE results12 ADD Total Numeric, Percentage Numeric, Status char(5)"

By the way what is type of variable dr ? is it ADODB.Connection?
Regards
Shaik Akthar
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 16
Reputation: mykar_88 is an unknown quantity at this point 
Solved Threads: 0
mykar_88 mykar_88 is offline Offline
Newbie Poster

Re: syntax error

 
0
  #7
Dec 6th, 2008
hi
i'm also using MS-Access as backend
dr is a DAO connection.
i have included another alter statement.but its working.
anyhow once again i'll try with ur syntax and update it to u.
thank u
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC