0
SQL Query Problem (ASP.NET)
LEGEND
,
/t5/dreamweaver-discussions/sql-query-problem-asp-net/td-p/1025816
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
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
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Newsgroup_User
AUTHOR
LEGEND
,
LATEST
/t5/dreamweaver-discussions/sql-query-problem-asp-net/m-p/1025817#M148956
Sep 18, 2006
Sep 18, 2006
Copy link to clipboard
Copied
Nevermind...I needed to name my variable @myID and it worked
fine.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

