![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am using a simple lookup liske this : SELECT COUNT(USERID) AS countID FROM dbo.user WHERE (IS_ACTIVE = 'Y') AND (USERID= ?) USERID =(numeric(3,0),not null) and I am trying to send it the value through my activex code as this IF DTSSource("Col002").Value <> "P1" AND IsNumeric( DTSSource("Col002").Value ) THEN IF DTSLookups("UserLookup").Execute(DTSSource("Col002 ").Value) > 0 THEN Validation =TRUE END IF end if but I'm getting this error: microsoft ole db provider for sql server invalid character value for cast specification Thanks for your help |
#3
| |||
| |||
|
|
IF DTSSource("Col002").Value <> "P1" AND IsNumeric(DTSSource("Col002").Value ) AND Len(Cstr(DTSSource("Col002").Value)) < 3 THEN IF DTSLookups("UserLookup").Execute(DTSSource("Col002 ").Value) > 0 THEN Validation =TRUE END IF end if |
|
Have a look at all the values for Col002 Do this in QA select ISNUMERIC('£') It returns a 1 whereas this is most definitely not a number. Allan "RayAll" <RayAll (AT) microsft (DOT) com> wrote I am using a simple lookup liske this : SELECT COUNT(USERID) AS countID FROM dbo.user WHERE (IS_ACTIVE = 'Y') AND (USERID= ?) USERID =(numeric(3,0),not null) and I am trying to send it the value through my activex code as this IF DTSSource("Col002").Value <> "P1" AND IsNumeric( DTSSource("Col002").Value ) THEN IF DTSLookups("UserLookup").Execute(DTSSource("Col002 ").Value) > 0 THEN Validation =TRUE END IF end if but I'm getting this error: microsoft ole db provider for sql server invalid character value for cast specification Thanks for your help |
![]() |
| Thread Tools | |
| Display Modes | |
| |