Whats this error??

MiniMe
Posts: 210
Joined: Thu Mar 15, 2001 4:30 pm

Whats this error??

Post by MiniMe »

I pushed a new table into our database last night and kept getting this error from one of our apps. Can you tell me why it's mad.

Could not assign long to char (9 to 130) in the function fldcopy
User avatar
John
Site Admin
Posts: 2623
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH

Whats this error??

Post by John »

Apparently one of your fields is defined as CHAR(), and you are trying to insert a long into it. Most likely the field is too short to handle numbers, which may require 12 or 23 characters, depending on the size of numbers on your system.
John Turnbull
Thunderstone Software
MiniMe
Posts: 210
Joined: Thu Mar 15, 2001 4:30 pm

Whats this error??

Post by MiniMe »

I am trying to do a select statment and am getting this error...

<!-- 200 chkavail:59: select id from books where BOOKNUM = `11212323'; -->
<!-- 000 chkavail:59: Could not assign long to char (9 to 130) in the function fldcopy -->
<!-- 200 chkavail:64: select id from books where BOOKNUM = `11212323'; -->
<!-- 000 chkavail:64: Could not assign long to char (137 to 130) in the function fldcopy -->

How can I get around it.. When I do the same search with TSQL it works..
User avatar
John
Site Admin
Posts: 2623
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH

Whats this error??

Post by John »

Convert your parameter to a string before the query, e.g.

<sum %s '' $BOOKNUM>
<$BOOKNUM=$ret>
John Turnbull
Thunderstone Software