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.


Sqlite


Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 08-21-2007, 01:09 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

Did the SQLCompiled example (from the above post) work on your device?
Reply With Quote
  #12 (permalink)  
Old 08-21-2007, 01:31 PM
Senior Member
 
Join Date: Jul 2007
Posts: 147
Awards Showcase
Beta Tester 
Total Awards: 1
Default sqlite

Erel the sqlexample.exe works fine on device and on desktop. When you asked me that question I didn't even to try that. I copied the whole folder to my device and all ran well, that answers the question about net on the device also on my desktop so now am I doing wrong in my program. It works in the ide's on both but not after I compile it. Well back to searching.

dennishea

edit:
I have the desktop compiled version working on the desktop. I had some of the device files on the desktop and they don't work to well. Now that I understand the file system I believe that I have the device files right and now it gives error loading program nullreferenceexception. Now I'm lost again.

edit again:
Ok I recompiled my program after verifying that all the files were in place and wala it works. The program isn't finish by any means and the only thing at this point that got me baffled is this command,

Sub btnSort_Click
text = "Select Internal FROM WorkData ORDER BY Internal"
cmd.CommandText=text
' Msgbox(cmd.CommandText)
cmd.ExecuteNonQuery
cmd.CommandText = " select * from WorkData "
cmd.ExecuteTable("table2",500)
frmRecord.Close
frmTable.Show
End Sub

When I push the button it does everything in the sub without popping up a error except sorting the data base. Thanks ahead of time for any help pointing out what I'm doing wrong.

dennishea

Last edited by dennishea : 08-21-2007 at 06:14 PM.
Reply With Quote
  #13 (permalink)  
Old 08-22-2007, 04:18 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

Is Table2 empty before cmd.ExecuteTable?
If not then try adding Table2.Clear before this line.
Reply With Quote
  #14 (permalink)  
Old 08-22-2007, 05:35 PM
Senior Member
 
Join Date: Jul 2007
Posts: 147
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I tried table2.clear before cmd.ExecuteTable("table2",500) and it still respondes the same. I am trying to sort the database mydata1.sl3 table WorkData so when I close it it will be sorted ascending on col Internal. Sqlite is suppose to be able to do this I think. I can get the table to sort but thats not what I want, when I close the program for this session I want the database to be sorted. I hope this explains what I am trying to do and hope it can be done.

dennishea

p.s. Please forgive me if I misinterpute what you are trying to tell me.
Reply With Quote
  #15 (permalink)  
Old 08-22-2007, 06:49 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,687
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by dennishea View Post
I want the database to be sorted.
I think you have an incorrect picture of how a SQL database works. The database is just a collection of data but it is not like a spreadsheet that you can sort and save sorted. The native order of data in a SQL database is not visible or relevant or alterable by users - the internal database engine may order it in some fashion for efficiency but you don't see this. If you want to see data from a SQL database then you need to SELECT it into a table and if you want it sorted then you must specify ORDER BY in that selection.
Reply With Quote
  #16 (permalink)  
Old 08-23-2007, 12:39 PM
Senior Member
 
Join Date: Jul 2007
Posts: 147
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Thanks agraham. I didn't realize that you couldn't rearrange the database itself. Again thanks for your help.

dennishea
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


All times are GMT. The time now is 01:16 PM.


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