Skip to Content
author's profile photo Former Member
Former Member

increment customer number

Hello friends,

via VB I want to import customers into BO.

To set a customer number, I need to know what´s the next free number.

Does anyone know a simple way to get this information?

Thanks for your help.

Best reguards.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 11, 2005 at 09:38 AM

    Hello Norbert,

    You might want to run a SQL statement like "SELECT MAX(CardCode) AS MaxCode FROM OCRD" etc.

    In case you only use numbers, you can convert the result directly to a number in VB (VB.NET: CInt(oRecordSet.Fields.Item("MaxCode").Value) and increment it. Otherwise you have to treat the result according to the pattern you want to use...

    Regards,

    Frank

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.