This topic is locked

variables sometimes have underscores stripped out

1/19/2005 9:55:42 AM
ASPRunner.NET General questions
T
Talis author

I am running a trial version of ASPRunner.NET and found an error that you may want to be aware. It will probably be easy to fix.
I am trying to add a new record into an employee table. The column names of the underlying table often have underscores. I built an application with "Build in Debug Mode" checked on.
Here is my error:
Error: Must declare the variable '@HONORARYTITLE'.
Here is my debug info:
insert into [dbo].[EMPLOYEE_MASTER] ([HONORARY_TITLE], [FIRST_NAME], [MIDDLE_NAME], [LAST_NAME], [NAME_SUFFIX], [PREFERRED_NAME], [FULL_NAME], [ELLIGABLE_FOR_REHIRE], [CORP_EMAIL], [ALTERNATE_EMAIL], [SSN], [DOB], [HOLD_FOR_PAYROLL], [GENDER_LOOKUP_ID], [HOURS_WORKED_LOOKUP_ID], [RACE_LOOKUP_ID], [CREATE_DATE]) values (@HONORARYTITLE, @FIRSTNAME, @MIDDLENAME, @LASTNAME, @NAMESUFFIX, @PREFERREDNAME, @FULLNAME, @ELLIGABLEFORREHIRE, @CORPEMAIL, @ALTERNATEEMAIL, @SSN, @DOB, @HOLDFORPAYROLL, @GENDERLOOKUPID, @HOURSWORKEDLOOKUPID, @RACELOOKUPID, @CREATEDATE)
@HONORARY_TITLE(NVarChar)=

@FIRST_NAME(NVarChar)=Doug

@MIDDLE_NAME(NVarChar)=

@LAST_NAME(NVarChar)=Corbett

@NAME_SUFFIX(NVarChar)=

@PREFERRED_NAME(NVarChar)=

@FULL_NAME(NVarChar)=

@ELLIGABLE_FOR_REHIRE(Bit)=

@CORP_EMAIL(NVarChar)=

@ALTERNATE_EMAIL(NVarChar)=

@SSN(NVarChar)=

@DOB(DateTime)=

@HOLD_FOR_PAYROLL(Bit)=

@GENDER_LOOKUP_ID(Int)=

@HOURS_WORKED_LOOKUP_ID(Int)=

@RACE_LOOKUP_ID(Int)=

@CREATE_DATE(DateTime)=

As you can see the insert statement uses the variable @HONORARYTITLE, whereas the actual variable declared is @HONORARY_TITLE.
I hope this helps.

  • Doug

admin 1/26/2005

Doug,
please download this update where problem with parameter names was fixed:

http://www.asprunner.com/files/asprunnernet-setup.exe