Link to home
Start Free TrialLog in
Avatar of mrferrari
mrferrariFlag for United States of America

asked on

BigInt Type Name is Invalid

Hi. I am using .asp and appending a parameter to a SQL statement

Set objCmd3 = Server.CreateObject("ADODB.Command")
With objCmd3
  .ActiveConnection = mainpipe
  .CommandType = 1
  .Prepared = True
  .CommandText = "select Link from tblDirectoryListing where ListingID = ?;"
End With
objCmd3.Parameters.Append objCmd3.CreateParameter(,20,1,4)

20 refers to a variable type of bigint, this works fine on my development machine, but when I transfer the application to my production machine I am getting the following error.

Microsoft OLE DB Provider for SQL Server error '80040e30'
Type name is invalid.

If I change the datatype to 3 (int), in some cases where the number is small this will work.

Does this have to do with the driver, could it be that my driver on the production machine is not SQL 2000. Bigint is a new datatype in SQL 2000.


thanks,
Marc
Avatar of amit_g
amit_g
Flag of United States of America image

Check the definition of table tblDirectoryListing in production server. Column ListingID is BigInt or Int?
Avatar of mrferrari

ASKER

The database sits on a seperate server. Both prod and dev servers point to the same database.

thanks,
Marc
ASKER CERTIFIED SOLUTION
Avatar of amit_g
amit_g
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That seems good. Ill get back to you with the points probably tomorrow. My SA is a slower than a turtle on vacation.

thanks.
They all are ;)
Change this:
objCmd3.Parameters.Append objCmd3.CreateParameter(,20,1,4)

To:
objCmd3.Parameters.Append objCmd3.CreateParameter(,20,1,8)

Or:
objCmd3.Parameters.Append objCmd3.CreateParameter(,20,1,0)
no dice. didnt work. but tell us what that means?
>>but tell us what that means?<<
Set parameter = command.CreateParameter (Name, Type, Direction, Size, Value

BigInt is 8 bytes
Integer is 4 bytes.