Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


SQL errors


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-17-2007, 10:21 AM
Junior Member
 
Join Date: Dec 2007
Posts: 43
Default SQL errors

Hello all!

I would like to have a little tip on how to test for "potential" errors running SQL commands.

eg. How to test if the CONN.OPEN("Data Base = " & AppPath & "\" & myDB) did not generated an error? (HD failure, disk full....)

Many thanks

Mimmo
Reply With Quote
  #2 (permalink)  
Old 12-17-2007, 10:32 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,334
Default

You should use ErrorLabel to catch errors.
If the Open method fails then an error will be raised.
You can then show a message to the user that the sql connection has failed.
Reply With Quote
  #3 (permalink)  
Old 12-17-2007, 10:43 AM
Junior Member
 
Join Date: Dec 2007
Posts: 43
Default

Hello Erel

many thanks for your quick reply!

My question was intended to understand when/if the SQL commands/funtions return any value (numerical/boolean or whatever else) to the calling routine as in:

Do While Reader.ReadNextRow = TRUE
...
Loop

In this case the ReadNextRow return a bool.

Thanks
Mimmo
Reply With Quote
  #4 (permalink)  
Old 12-17-2007, 10:51 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,334
Default

You should check the SQL manual to find which methods return a value: http://www.basic4ppc.com/help/sql/index.html

Generally speaking, methods throw errors and don't return a succeed / failure value.
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
networking errors bGoody_iPAC_rx1950PPC Questions & Help Needed 13 02-04-2008 03:44 PM
Errors in code blocks? agraham Questions & Help Needed 1 11-23-2007 07:05 AM
Table errors Big JR Questions & Help Needed 8 06-09-2007 10:12 AM
ImageLib & Getpixel - bugs or user errors? LineCutter Questions & Help Needed 4 05-24-2007 06:05 PM


All times are GMT. The time now is 05:18 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0