Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

SQL Query Problem (ASP.NET)

LEGEND ,
Sep 18, 2006 Sep 18, 2006

Copy link to clipboard

Copied

Using DW 8, ASP.NET 2.0

Using the built-in Dreamweaver DataSet, I created a SQL call:

SELECT tblScreens.ID, tblScreens.Filename, tblScreens.Width,
tblScreens.Height, tblScreens.PlayerVersion
FROM tblScreens
WHERE tblScreens.ID = myID

Using the "build" button, I created a parameter

Name: myID
Type: Int
Value: ((Request.QueryString["ID"] != null) &&
(Request.QueryString["ID"].Length > 0)) ? Request.QueryString["ID"] : "10"

I'm getting errors when testing

System.Data.SqlClient.SqlException: Invalid column name 'myID'.
...
...

I don't know how I'm supposed to set the comparison on this line:
WHERE tblScreens.ID = myID

because it obviously is having problems there.

Any help is much appreciated.

- Chris




TOPICS
Server side applications

Views

166
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 18, 2006 Sep 18, 2006

Copy link to clipboard

Copied

LATEST
Nevermind...I needed to name my variable @myID and it worked fine.


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines