asp.net

asp.net

am 26.03.2007 08:50:05 von ks_anishaa

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?

Re: asp.net

am 26.03.2007 12:18:38 von reb01501

ks_anishaa@yahoo.co.in wrote:
> 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?
--
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"