Connecting Tech Pros Worldwide Forums | Help | Site Map

Invalid Column name

Newbie
 
Join Date: Oct 2009
Posts: 3
#1: 4 Weeks Ago
hi, i am trying to generate a report through a record in a combo box but i get this error "invalid column name "DFG55FS"
Please note "DFG55FS" is a record name in my combobox. please help
i am using vb.net 2005 and SQL 2000

my code here..


"select *from Booking2 where horsereg =" & Me.ComboBox1.Text
best answer - posted by MikeTheBike
Hi

Perhapse

"select * from Booking2 where horsereg = '" & Me.ComboBox1.Text & "'"

??

MTB

Expert
 
Join Date: Jun 2007
Location: Derbyshire, UK
Posts: 347
#2: 4 Weeks Ago

re: Invalid Column name


Hi

Perhapse

"select * from Booking2 where horsereg = '" & Me.ComboBox1.Text & "'"

??

MTB
Newbie
 
Join Date: Oct 2009
Posts: 3
#3: 4 Weeks Ago

re: Invalid Column name


thank you so much. it helped so sort out the problem...
Reply