admin 12/7/2017 | |
You need to run your app in Visual Studio in debug more and step through the code in this event to see what value 'rnoo' variable gets. You might need to convert data["c"] to integer before using it in calculations. |
A
|
admin author 12/8/2017 |
You need to run your app in Visual Studio in debug more and step through the code in this event to see what value 'rnoo' variable gets. You might need to convert data["c"] to integer before using it in calculations.
|
A
|
admin author 12/9/2017 |
Thank you for suggestion :-) If i code following: string sql = "SELECT MAX(bilid) as c FROM bildata"; XVar rs = tDAL.CustomQuery(sql); XVar data = CommonFunctions.db_fetch_array(rs); var rnoo = Convert.ToInt32(data["c"]) + 1; I get following error compiling (sorry about the Danish part) \\ ERP_LeaseBil_nu.csproj Microsoft (R) Build Engine, version 4.7.2053.0 [Microsoft .NET Framework, version 4.0.30319.42000] Copyright (C) Microsoft Corporation 2007. Alle rettigheder forbeholdes. \\ ERP_LeaseBil_nuEventsCS.csproj Microsoft (R) Build Engine, version 4.7.2053.0 [Microsoft .NET Framework, version 4.0.30319.42000] Copyright (C) Microsoft Corporation 2007. Alle rettigheder forbeholdes. include\bildata_TableEvents.cs(27,12): error CS0121: Kaldet er flertydigt for f›lgende metoder eller egenskaber: 'System.Convert.ToInt32(long)' og 'System.Convert.ToInt32(string)' [C:\Users\Auto\Documents\ASPRunnerNETProjects\ERP-LeaseBil.nu\output\ERP_LeaseBil_nuEventsCS.csproj] What i need is the recordnumber of the record being added Is there another way to get number of records in the current table? Thank you in advance
|