Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Encountered a confusing error message? Please post here

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-14-2009, 11:24 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Lightbulb Encountered a confusing error message? Please post here

We plan to improve Basic4ppc error checking and especially to refine the error messages in the next version.
So if you have encountered a confusing error message please reply to this post and also add the code that created the error message.
Thank you
Reply With Quote
  #2 (permalink)  
Old 09-09-2009, 08:53 PM
Junior Member
 
Join Date: Aug 2009
Posts: 30
Default error on device

I have just loaded basic4ppc onto my new samsung omnia and Im encountering this error . an error occurred on sub main app_start .
line number 20
table10.loadcsv ("fooddat.csv",",",false true)
Error description : an error message cannot be displayed because an optional resource assembly containing it cannot be found
Continue?

What am I doing wrong?
Reply With Quote
  #3 (permalink)  
Old 09-09-2009, 09:19 PM
RandomCoder's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire, UK
Posts: 623
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by michaelm View Post
I have just loaded basic4ppc onto my new samsung omnia and Im encountering this error . an error occurred on sub main app_start .
line number 20
table10.loadcsv ("fooddat.csv",",",false true)
Error description : an error message cannot be displayed because an optional resource assembly containing it cannot be found
Continue?

What am I doing wrong?
For the complete error messages look here http://www.basic4ppc.com/forum/code-...not-found.html

The problem with your code is here...
Code:
table10.loadcsv ("fooddat.csv",",",<font color="Red">false true</font>)
It's either false or true not both

Regards,
Randomcoder
__________________
"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #4 (permalink)  
Old 09-09-2009, 11:28 PM
Junior Member
 
Join Date: Aug 2009
Posts: 30
Default

In my last post I forgot to put the "," between the words false and true. I do need both because I have no header and I want the column names to be "Column1, column2, etc.

From Main Help:
Quote:
Loads data to the Table from a CSV file.
Syntax: LoadCSV (File Name, Separator Character, Header Exist, Create Columns)
Separator Character - The character that is used to separate between the values. Usually , (comma)
Header Exist - A boolean that tells if the first row in the file is the columns names (header values) or the file contains only the data.
Create Columns - If set to True, new columns will be created (type - cString). If false the current columns will remain and the data will be added. In the second case the column number and type must match the data.


If HeaderExist is True and CreateColumns is True: New columns will be created named as the values of the first row in file.
If HeaderExist is True and CreateColumns is False: The data will be added to the current columns ignoring the first row in file.
If HeaderExist is False and CreateColumns is True: New columns will be created named Column1, Column2...
If HeaderExist is False and CreateColumns is False: The data will be added to the current columns including the first row in file.
Example:
Table1.LoadCSV ("data.csv", ",", True, True)
I'm new to this so maybe I'm mistaken.
Reply With Quote
  #5 (permalink)  
Old 09-11-2009, 08:08 PM
Ariel_Z's Avatar
Basic4ppc Veteran
 
Join Date: May 2009
Posts: 246
Default

You are right. What RandomCoder meant is that you must have the comma (",") in between, or you will get an error.
Reply With Quote
  #6 (permalink)  
Old 09-14-2009, 12:05 PM
Basic4ppc Expert
 
Join Date: Apr 2009
Posts: 506
Default

Hi All,

This is the code snippet
Code:
Sub txtCustomer_LostFocus
'Using tblProducts to hold temporary Data
txt=txtCustomer.Text
command.CommandText=
"SELECT [Customer Code], [Customer], [Address] FROM [Custs] WHERE [Customer Code] LIKE '%" & txt &"%'"
Command.ExecuteTable(
"tblProducts",0)
'Now load the table values into the label control
txtCustName.Text=tblProducts.Cell("Customer"0)
txtCustAddress.Text=tblProducts.Cell(
"Address"0)
CustCode=tblProducts.Cell(
"Customer Code"0)
'Set the combo Control To correct Code
For i = 0 To cboCust.Count-1
    
If cboCust.Item (i) = CustCode Then 
        cboCust.SelectedIndex=i    
        
Exit
    
End If
Next 
btnAccept.Enabled=
True
End Sub
When i type in any letter up to trea the code works but if i type in the next letter which is s as in treas then the code does not work

So if i type in t i get 'treasure'
also any other letter in the word up to and including a gives me the same correct result. But when i type in the s the code gives me this error
an error occured on sub main txtCustomer_LostFocus
line no 229
txtCustName.Text=tblProducts.Cell("Customer", 0)
error description:
Index 0 is either negative or above rows count.

What is causing this error?

thanks
Reply With Quote
  #7 (permalink)  
Old 09-14-2009, 06:19 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Maybe no rows are returning in this case?
You can check tblProducts.RowCount to see the number of rows in the table.
Reply With Quote
  #8 (permalink)  
Old 09-14-2009, 08:42 PM
Basic4ppc Expert
 
Join Date: Apr 2009
Posts: 506
Default

Quote:
Originally Posted by Erel View Post
Maybe no rows are returning in this case?
You can check tblProducts.RowCount to see the number of rows in the table.
Thanks for the reply Erel,

I assumed that that was the case but i cannot understand why no rows are returned for treas when looking for the word treasure but a row is returned for the shorter version 'trea'

Can you shed any light on this because when a search is performed i do not know how ppl will do a search for a particular record



Last edited by Smee : 09-15-2009 at 10:09 AM. Reason: Unclear explanation for more info
Reply With Quote
  #9 (permalink)  
Old 09-15-2009, 11:01 AM
Basic4ppc Expert
 
Join Date: Apr 2009
Posts: 506
Default

ok i worked it out for anyone's information;

I was inadvertently testing against the Customer Code field which is an indexed field of 5 characters instead of the Customer field hence it only allowed the 'trea' and no further. The index for that field is G12TREA.

thanks for the input Erel

Reply With Quote
  #10 (permalink)  
Old 10-10-2009, 02:46 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

This simple program returns the wrong result, without error, in the IDE but fails optimised comilation indicating that the error is on the "End Sub" of App_start whereas it's the semicolon at the end of the line in the For loop that is the problem.
Code:
Sub Globals
End Sub

Sub App_Start
    
Msgbox(DoMaths)
End Sub

Sub DoMaths
    
For i = 0 To 10 
        l = l + i;
    
Next
    
Return l
End Sub
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with error message skmobile Questions (Windows Mobile) 2 09-07-2008 07:07 PM
ERROR:Message cdeane Questions (Windows Mobile) 10 07-21-2008 06:59 PM
HTTP POST error message miataman Questions (Windows Mobile) 10 07-11-2008 10:28 AM
HTTP POST error Elrick Bug Reports 3 05-24-2008 02:06 PM
HTTP POST on Device - error message TWELVE Questions (Windows Mobile) 6 04-26-2008 09:35 AM


All times are GMT. The time now is 08:24 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0