Encountered a confusing error message? Please post here

panic

Member
Licensed User
Longtime User
The following code compiles OK in IDE but produces Error CS1026 in Line 10 when compiling:

Sub Globals
Dim Res
End Sub

Sub Add( param1, param2)
Return param1 + param2
End Sub

Sub App_Start
Res = Add( 1 , 2)
End Sub
 

Smee

Well-Known Member
Licensed User
Longtime User
Error in Compile

Thew error message is CS1026: ) expected

The line that throws the error is this one
x=0
I have tried different configurations but no luck

Code=WDSales.tblProducts.SelectCell("Code",x)

this is the full code snippet

WDSales.tblProducts.LoadCSV ("CeProducts.csv", ",", True, True)
For x = 0 To WDSales.tblProducts.RowCount
Code=WDSales.tblProducts.SelectCell("Code",x)
Cmd.CommandText="DELETE FROM Products WHERE Code='" & Code & "'"
Cmd.ExecuteNonQuery
cmd.CommandText = "INSERT INTO Products SELECT Code,SupplierCode,BinLoc,Description,QtyInStock from TempTable"
cmd.ExecuteNonQuery
Next

I am suspecting that it is because the table is being defined only by the LoadCSV command but that csv file does have a field called code in it.
Is it necessary to define the whole table first?

Thanks Joe
 

Smee

Well-Known Member
Licensed User
Longtime User
sorry, i did not make it too clear. the line that throws the error is this one

Code=WDSales.tblProducts.SelectCell("Code",x)

I have tried assigning a value instead of x but it does not work either

Thanks
 

Smee

Well-Known Member
Licensed User
Longtime User
Thank you Andy,

As usual the simple mistakes are often the hardest to see yourself

Cheers

Joe
 

nl1007

Member
Licensed User
Longtime User
SQL Transation error

I wrote a program for a mobile device with GPS, which updates a database.
My customer has recently got another device, so now I have two databases, and need to merge the updates.
I have written a (desktop) program which uses 2 connections, commands and reader objects so that I can find records in one database which are newer than the 'master' database. I'm assembling an 'Update' SQL command, using parameters, but the Conn1.EndTransaction causes this error:
"SQLite error
cannot commit transaction - SQL statements in progress
"
At first I wondered if there were too many fields/values [34], so I commented some of it out, but still get the error. I'd had a few SQL errors, causing the program to abort, so I wondered if the 'BeginTransaction' had left the database in an odd state, but I can update it with my original program, and also using 'Sqliteman'.
I've commented out the 'BeginTransaction' and 'EndTransaction', and it has successfully updated one record. (not tried all fields yet; still commented out)

I've fixed it.. I had two Readers on the same connection; one to get the existing values, and one to do the update - and the first one wasn't closed when I did the update.
 
Last edited:

konisek

Member
Licensed User
Longtime User
Since yesterday I have got a strange message while using HTTP library:
B4X:
Response code: - 1
NameResolutionFailure
Before it worked fine.
Strange is that even neither Internet Explorer nor Opera browser do not work any more.
Connection via Network library works fine though.
Soft reset has no effect. I did not change any registry. Any idea?
 

konisek

Member
Licensed User
Longtime User
I have tested my app with several kinds of PDA with either WM6.1 and WM6.5, it works fine but with this one:
Samsung C6625
It is a non-touch PDA with WM6.1 and landscape screen. It generates:
B4X:
oskarek_PDA.exe NonSupportedException 

v Microsoft.AGL.Common.MISC.HandleAr() 
v 
Microsoft.WindowsCE.Forms.InputPanel..ctor() 
vC.b..ctor() 
v C.b.a()
Is it because of the hw keyboard or maybe different CF?
 

konisek

Member
Licensed User
Longtime User
No, I did not. Will do right now and tell. Thanx for advice.
........
Compilation OK, can run it on the Smartphone but cannot control.
I checked the HELP and found this:
Some controls are not useful without a touch screen and therefore are not supported (OS limitation).
The following controls are not supported:
· Button
· Calendar
· ImageButton
· ListBox
· NumUpDown
· RadioBtn
· SaveDialog

Does it mean, there is now chance to make an app with buttons and run it on a smartphone???
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…