none
Vb.net Field wont allow numbers more than 10 RRS feed

  • Question

  • Hello

    I am new to Vb.net and i m preparing a project as practice. 

    I have created a database which hold information of clients banking details. While adding new records field of account number 

    does not allowing me to enter numbers than 10 digit. where as i wanted to enter 21 digit number in same field. I have selected int64 type property for the fields. and in datatable as "Long Integar". but still if I enter digits more than 10 , it gives me error that int64 cannot be converted in int32.

    Please help

    Thank You

    Thursday, May 16, 2019 5:16 AM

All replies

  • Can you tell us what is the database e.g. MS-Access ?

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Thursday, May 16, 2019 9:33 AM
    Moderator
  • Yess mam., it is a ms-access and and i have selected long integer as data type. and int64 in form for textbox but still cannot able to enter 20 digit value in textbox...

    Thank  You  for reply 

    Please help 

    Thursday, May 16, 2019 10:32 AM
  • Have you tried "Large Number" which is for .accdb only?


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Thursday, May 16, 2019 11:04 AM
    Moderator
  • Are you sure it are digits and not numeral characters for which the datatype is Text (string)

    Integer and decimal fields are meant to be used to calculate. 

    21 digits means that it can hold a sextillion (a billion times a trillion) as value.

    A value you can maybe use to express the distance to the sun in millimeter. (inch/2600)


    Success
    Cor

    Thursday, May 16, 2019 11:02 PM
  • HELLO MAM., 

    I am using ms-access 2010 and my database file name is data.accdb. but still I am not able to find Large Number under data type., there is "Long Integer" and i have selected it. Still 10 + digits are not being entered. 

    Please Help., 

    Thank You 

    Friday, May 17, 2019 7:21 AM
  • Hello, 

    Yess Sir., I am very sure that all it is a numrical values only there are no text. 

    and abt 21 digit- there are some banks in India which account numbers are 21 digit. 

    Please Help

    Thank You., 

    Friday, May 17, 2019 7:23 AM
  • Hello, 

    Yess Sir., I am very sure that all it is a numrical values only there are no text. 

    and abt 21 digit- there are some banks in India which account numbers are 21 digit. 

     

    A bank account is not a value. A salary is a value. Does your salary contains 21 digits? 

    A bank account is an ID and as I wrote can ID's best be done using Strings (That can contain only digits, which is easy to test with VB but that is another question). 


    Success
    Cor

    Friday, May 17, 2019 9:41 AM
  • If you have say 1234 12345 1239 90987 then you would store the account number in a string, not a numeric value.

    When entering the value I would assume you would use some form of validation be it simply logic to test the data entered is in the right format which perhaps could be done with regular expressions e.g.

    ^\d{6}\s\d{6}\s\d{7}$


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Friday, May 17, 2019 11:24 AM
    Moderator