|
-
Mar 9th, 2009, 02:54 AM
#1
Thread Starter
New Member
[RESOLVED] Data Report Error
hi everyone! im a vb beginner and im encountering error like this: "incorrect syntax near '10001'" on my data report everytime i execute it.
Problem: whats the correct query of my code below,'coz im trying to set my report or group it by ProdType
Set rs = con.Execute("Select ProdNo, ProdDesc, Qty, UnitPrice, TotalAmt,Prodtype, Count(') as ProdType from tbl3DRitems where DRno = '" & Combo2.Text & "' group by ProdType")
Can anyone give me some insight into what might be causing this problem?
Thanks,
ishee
Last edited by ishee17; Mar 11th, 2009 at 10:18 PM.
-
Mar 9th, 2009, 03:51 AM
#2
Frenzied Member
Re: Data Report Error
WELCOME ishee17 
you haven't declared what is con, rs. First declare them followed by setting them.
-
Mar 11th, 2009, 02:36 AM
#3
Thread Starter
New Member
Re: Data Report Error
 Originally Posted by VBFnewcomer
WELCOME ishee17 
you haven't declared what is con, rs. First declare them followed by setting them.
thanks for the response and for your warm welcome!
Last edited by ishee17; Mar 11th, 2009 at 10:11 PM.
-
Mar 11th, 2009, 10:19 PM
#4
Thread Starter
New Member
Re: Data Report Error
 Originally Posted by VBFnewcomer
WELCOME ishee17 
you haven't declared what is con, rs. First declare them followed by setting them.
i changed the problem.. im using ms sql8 DB.
-
Mar 11th, 2009, 10:41 PM
#5
Re: Data Report Error
Code:
Set rs = con.Execute("Select ProdNo, ProdDesc, Qty, UnitPrice, TotalAmt,Prodtype, Count(') as ProdType from tbl3DRitems where DRno = '" & Combo2.Text & "' group by ProdType")
I'm not sure about that, Can You duplicate field names?
-
Mar 12th, 2009, 01:51 AM
#6
Thread Starter
New Member
Re: Data Report Error
 Originally Posted by jggtz
I'm not sure about that, Can You duplicate field names?
either i duplicate it or not still the same error.. 
but if some one could tell me another way of grouping records without using data environment wouldl be a great help....
Last edited by ishee17; Mar 12th, 2009 at 01:56 AM.
-
Mar 18th, 2009, 08:49 PM
#7
Thread Starter
New Member
Re: Data Report Error
 Originally Posted by ishee17
either i duplicate it or not still the same error.. 
but if some one could tell me another way of grouping records without using data environment wouldl be a great help....
i got it now i just searched the sql syntax of group by clause.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|