mrferrari
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(,2 0,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
Set objCmd3 = Server.CreateObject("ADODB
With objCmd3
.ActiveConnection = mainpipe
.CommandType = 1
.Prepared = True
.CommandText = "select Link from tblDirectoryListing where ListingID = ?;"
End With
objCmd3.Parameters.Append objCmd3.CreateParameter(,2
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
Check the definition of table tblDirectoryListing in production server. Column ListingID is BigInt or Int?
ASKER
The database sits on a seperate server. Both prod and dev servers point to the same database.
thanks,
Marc
thanks,
Marc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That seems good. Ill get back to you with the points probably tomorrow. My SA is a slower than a turtle on vacation.
thanks.
thanks.
They all are ;)
Change this:
objCmd3.Parameters.Append objCmd3.CreateParameter(,2 0,1,4)
To:
objCmd3.Parameters.Append objCmd3.CreateParameter(,2 0,1,8)
Or:
objCmd3.Parameters.Append objCmd3.CreateParameter(,2 0,1,0)
objCmd3.Parameters.Append objCmd3.CreateParameter(,2
To:
objCmd3.Parameters.Append objCmd3.CreateParameter(,2
Or:
objCmd3.Parameters.Append objCmd3.CreateParameter(,2
ASKER
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.
Set parameter = command.CreateParameter (Name, Type, Direction, Size, Value
BigInt is 8 bytes
Integer is 4 bytes.