Re: Delphi 6 - Data type conversion error, please help

From: Jamie (jamie_5_not_valid_after_5_Please_at_charter.net)
Date: 07/20/04


Date: Tue, 20 Jul 2004 13:57:48 -0700

for what ever reason your numbers are going over the 4 billion mark.
  a 32 bit integer can only hold 2^32
which is around 4.2 billion.
  if you really need to work with large numbers like that then try using
an int64 or a float.

Alan wrote:

> I have a stored procedure object on a form I've created with Delphi 6.
>
> The stored procedure object uses SOAP to connect to a Microsoft SQL
> 2000 server.
>
> One of the parameters required by the stored procedure is an Integer
> ID variable (let's called it record_ID).
>
> The record_ID numbers appear to have gotten larger than a standard
> Integer variable; for example, passing 918888847 as the record_ID
> works fine, but passing 7111111297 (one digit longer than the first
> one) gives "Error converting data type numeric to int".
>
> What's the best way to fix this?
>
> I've enabled the SQL stored procedure to work by declaring the
> record_ID input variable as "bigint" instead of "integer". In Delphi,
> the variable there is still a plain "integer", I'm guessing I need to
> change the variable type:
>
> myvariable : Cardinal;
>
> ...or whatever type is big enough, then pass this to the stored
> procedure in Delphi like this:
>
> sp_MySQL_stored_proc.Params.FindParam('record_ID').AsCardinal :=
> my_field_value;
>
> Please help, thanks!



Relevant Pages

  • Re: Selecting multiple checkboxes inside a GridView control
    ... Walk through all of the rows in the GridView and construct a comma-delimited string of the IDs of those which are checked. ... Create a stored procedure like below and pass the above string to it: ... Rem in the PRINT line and rem out the last two lines if you want to see what the dynamic SQL looks like first for testing purposes. ... Mark Rae ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: converting/casting before submitting
    ... Also, FIY, TinyInt is a value from 0-255, which in .Net maps to a Byte and ... So I next just went ahead> and tried to submit the value as is to the stored procedure to see if there> would be a problem. ... The SQL stored procedure was expecting a TinyInt as> declared in the stored procedure. ... have I been wasting time> and/or slowing performance converting/casting myself all this time? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: converting/casting before submitting
    ... Also, FIY, TinyInt is a value from 0-255, which in .Net maps to a Byte and ... So I next just went ahead> and tried to submit the value as is to the stored procedure to see if there> would be a problem. ... The SQL stored procedure was expecting a TinyInt as> declared in the stored procedure. ... have I been wasting time> and/or slowing performance converting/casting myself all this time? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: General architecture in BizTalk
    ... The SQL Adapter can only get data in two ways: ... read the next time the stored procedure gets fired. ... and either delete it or mark it read. ... Private blog: http://blog.eliasen.dk ...
    (microsoft.public.biztalk.general)
  • Re: ADO.Net 1.1 : SQL Insert ?
    ... Anyway, Mark is right, you have to learn VB.NET and ADO.NET to convert this ... See you can't see heaven without dying yourself, so you've gotta learn .NET. ... > 1) Create a stored procedure to fetch the records from F4111 ... >> Set rsstatm = Nothing ...
    (microsoft.public.dotnet.framework.adonet)