Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / March 2007



Tip: Looking for answers? Try searching our database.

asp.net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ks_anishaa@yahoo.co.in - 26 Mar 2007 07:50 GMT
Dim strImgId As String = Request.QueryString("id")
Dim cmd As New SqlCommand("select img_data, img_type from imgdisp where id=" & strImgId)
when i am using this i got an error like incorrect syntax near ="
what i have to do?
Bob Barrows [MVP] - 26 Mar 2007 11:18 GMT
> Dim strImgId As String = Request.QueryString("id")
> Dim cmd As New SqlCommand("select img_data, img_type from imgdisp
> where id=" & strImgId) when i am using this i got an error like
> incorrect syntax near ="
> what i have to do?

There was no way for you to know it (except maybe by browsing through some
of the previous questions in this newsgroup before posting yours - always a
recommended practice) , but this is a classic asp newsgroup. ASP.Net bears
very little resemblance to classic ASP so, while you may be lucky enough to
find a dotnet-knowledgeable person here who can answer your question, you
can eliminate the luck factor by posting your question to a group where
those dotnet-knowledgeable people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.

The people in that group will neeed to know more details, such as:
1. what is the database type and version?
2. what is the datatype of the id column?
3. what is the exact text of the error message?
4. have you confirmed that strImgId has a value?
Signature

Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.