16 digit numbers ( i tried the faq's)

# Thread: 16 digit numbers ( i tried the faq's)

1. Junior Member
Join Date
Dec 1969
Posts
8

## 16 digit numbers ( i tried the faq's)

I&#039;m tring to test my credit card field (16 digits) and am getting errors. I want to write a 16 digit number to an Access database. When I do try I always get an "out of present range" error. I checked the database and my field data type is set to number and my field size is long integer. Any solutions to this problem. I don&#039;t want to change my field type to text, but something tells me I have to.

2. Senior Member
Join Date
Dec 1969
Posts
11,247

## Use text field

I know it sounds Stupid to change to Text but unless you are doing a calculation on the field (I assume you will not) it is better in this case to use Text

3. Junior Member
Join Date
Dec 1969
Posts
8

## RE: Use text field

Thnaks White Knight. I didn&#039;t want to use it, but there&#039;s no other alternative for me at the moment. Works fine!! No calculations will be performed.

4. Senior Member
Join Date
Dec 1969
Posts
1,024

## RE: Use text field

even if you do want to perform calculations, just use cast, or convert it in your application.

5. Senior Member
Join Date
Dec 1969
Posts
11,247

## Cast and convert will not work!

16 digits!!!!<BR>Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 - 1 (2,147,483,647).

6. Senior Member
Join Date
Dec 1969
Posts
7,686

## Sure they will

he can convert it to a Double:<BR><BR>ā1.79769313486231E-308 to 4.94065645841247Eā324 <BR>

7. Senior Member
Join Date
Dec 1969
Posts
11,247

## So he can!

But I doubt he&#039;ll want to. So it&#039;s kinda irrelevant!

8. Senior Member
Join Date
Dec 1969
Posts
1,024

## RE: Cast and convert will not work!

So why not use bigint (in sql server), long integer(in access) or SQL_INTEGER in any ODBC compliant datasource?<BR><BR>bigint. Integer (whole number) data from -2^63 (-9223372036854775808) through 2^63-1 (9223372036854775807).<BR><BR>if you want to do it on the sql server.<BR><BR>Or unsigned long in VB (or variations of in other languages).<BR><BR><BR><BR><BR>cp

9. Senior Member
Join Date
Dec 1969
Posts
1,024

## RE: So he can!

In this case, no its not (as he doesn&#039;t want to perform any calculations), if he did (which i implied) then, yes, he would.<BR><BR><BR><BR>cp

10. Senior Member
Join Date
Dec 1969
Posts
11,247

## So I was only looking at INT

WK was wrong!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•