Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 26th, 2006, 04:05 PM
Authorized User
Points: 239, Level: 4
Points: 239, Level: 4 Points: 239, Level: 4 Points: 239, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jul 2005
Location: , , .
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trouble declarig Parameters

Hello and thank you for taking a moment to read this message. Here is my code:
SqlConnection dbConn2 = new SqlConnection(Session["usersconn"].ToString());

SqlCommand sqlCom2 = new SqlCommand("Update tblUser SET DiamondDealerID=@DiamondDealerID", dbConn2);

sqlCom2.Parameters["@DiamondDealerID"].Direction = ParameterDirection.Input;
sqlCom2.Parameters.Add("@DiamondDealerID", SqlDbType.Varchar);

sqlCom2.Parameter["@DiamonDealerId"].Value=DateTime.Now.Year.ToString()+Session["companyid"]+intID ;


I am getting the following error
Must declare the variable '@DiamondDealerID'.

Any help you could provide would be greatly appreciated.

Similar Threads
Thread Thread Starter Forum Replies Last Post
If Else Trouble Cibressus Beginning PHP 0 May 1st, 2007 02:04 PM
Please i have had a Trouble hurted Wrox Book Feedback 1 June 28th, 2004 02:18 AM
trouble databass Classic ASP Databases 2 August 16th, 2003 10:27 AM
trouble w/ command object and parameters RbH All Other Wrox Books 0 August 5th, 2003 12:31 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.