954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Insert statement problem in sql server 2005

Hi All
i have problem in insert statement in which one string returning me value as g's and because of that s is gets separated. and its giving me eroor as Incorrect syntax at s.

strSQL = "Insert into HeaderInfo(yAxisLabel , xAxisLabel , zAxisLabel , yAxisUnit , xAxisUnit , zAxisUnit)"
 strSQL &= " values('" & YAxisLabel & "','" & XAxisLabel & "','" & ZAxisLabel & "','" & YAxisUnit & "','" & XAxisUnit & "','" & ZAxisUnit & "') "


here YAxisUnit variable giving o/p as g's
so how to remove that problem
plz help me out from it

thanking you all

avinashpatil
Newbie Poster
1 post since Feb 2009
Reputation Points: 10
Solved Threads: 0
 

I don't understand your problem neither the error you got. Please clarify your question, copy the error message and tell us which language you use.

Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You