Click here to Skip to main content
15,886,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm storing the control location value in my database.
I am using object variable to store location of the controls but I'm facing some errors.

Operator '&' is not defined for string "IUD_dramdtls 0,'ad','2010/11/03'" and type 'Point'.

My coding is

VB
Query = "IUD_dramdtls " & clvdramakey & ",'" & clvdramname & "','" & clvdatefrom & "','" & clvdrdateto & "'," & clvdescprtn & ",'" & clvoprstamp & _
                         "'," & clvlogusrid & ",'" & IUTYPE & "'"



here ,'" & clvdescprtn & "', is my object variable through that variable I am passing contol location value.

Please solve this issue.
Posted
Updated 2-Nov-10 22:44pm
v2
Comments
Sunasara Imdadhusen 3-Nov-10 4:35am    
Not clear!
Dalek Dave 3-Nov-10 4:44am    
Edited for Grammar and Syntax.

1 solution

Hi,

Going by the error message, I guess you are concatenating (adding) string variables and at least one "Point" type variable.

Just check type of each variable type that you are trying to concatenate(add)in your code.

Hope it helps,

Thanks
Arindam D Tewary,
 
Share this answer
 
Comments
sameertm 3-Nov-10 5:29am    
iam not concatenating any variable jus iam passing values to sql,, but its showing error,commonly how object value will pass to sql from vb.net.
Arindam Tewary 3-Nov-10 5:38am    
The line you have showed here is actually adding(concetanting) couple of String variables and you are and assigning to "Query". I suspect the variable "clvdrdateto". Please check the type of variable "clvdrdateto".
Going by your post I see that starting "IUD_dramdtls", upto 3 variable were added correctly but the 4th variale was not added properly. Now this 4 th variable is "clvdrdateto". Please check.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900