943,796 Members | Top Members by Rank

Ad:
Dec 6th, 2008
0

syntax error

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mykar_88 is offline Offline
17 posts
since Mar 2008
Dec 6th, 2008
0

Re: syntax error

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.
Reputation Points: 26
Solved Threads: 40
Posting Whiz
aktharshaik is offline Offline
316 posts
since Aug 2008
Dec 6th, 2008
0

Re: syntax error

hi
i tried without parenthesis too
but if the parenthesis is removed,it is showing syntax error in alter statement.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mykar_88 is offline Offline
17 posts
since Mar 2008
Dec 6th, 2008
0

Re: syntax error

What is the Database Backend u r using??
Reputation Points: 26
Solved Threads: 40
Posting Whiz
aktharshaik is offline Offline
316 posts
since Aug 2008
Dec 6th, 2008
0

Re: syntax error

It worked for me with VB 6.0 and MS-Access Database.
Reputation Points: 26
Solved Threads: 40
Posting Whiz
aktharshaik is offline Offline
316 posts
since Aug 2008
Dec 6th, 2008
0

Re: syntax error

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?
Reputation Points: 26
Solved Threads: 40
Posting Whiz
aktharshaik is offline Offline
316 posts
since Aug 2008
Dec 6th, 2008
0

Re: syntax error

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mykar_88 is offline Offline
17 posts
since Mar 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Automate Power point using VB 6.0
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: data grid





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC