Ariane Soft PPL2 Pocket Programming DataMite
  #1  
Old 11-26-2006, 01:36 PM
dennishea dennishea is offline
Senior Member
 
Join Date: Oct 2006
Posts: 162
Default sqlite still

I am posting a simple sqlite endeavor. It has two buttons. Create and Go. Create seems to work. Go pops up an access error about sql.ppl. When you open the zip file there is a txt file to use with it. I'm not sure if my code is right. It compiles ok but I'm getting a nack for getting things to compile and still not work.

Denny

[br][file=../../e107_files/public/1164551724_112_FT0_dat.zip]1164551724_112_FT0_dat.zip[/file]
Reply With Quote
  #2  
Old 11-26-2006, 06:10 PM
PointOfLight PointOfLight is offline
Senior Member
 
Join Date: Sep 2006
Posts: 1,197
Default

I fixed a couple of the issues for you. The problem with the Go button was that you were not opening the SQLite database first, so you were passing a bogus handle to SQLExec. In your loading function, you are closing the database multiple times, so after the table creation nothing would actually be inserted. A good rule of thumb is to always open the database at the beginning of the function and not close it until you're exiting. I think there's still a problem with actually loading the data into the database, but I don't have the time to look at that right now.[br][file=../../e107_files/public/1164568241_49_FT1992_forum_sql.zip]1164568241_49_FT1992_forum_sql.zip[/file]
Reply With Quote
  #3  
Old 11-26-2006, 06:58 PM
dennishea dennishea is offline
Senior Member
 
Join Date: Oct 2006
Posts: 162
Default

I'm Patient, especially when somebody as active on the forum as you are. I do appreciate your help. Now let's go see some of the mistakes I made and hope I don't repeat them alot. Thanks Eric

Denny
Reply With Quote
  #4  
Old 11-27-2006, 04:41 AM
PointOfLight PointOfLight is offline
Senior Member
 
Join Date: Sep 2006
Posts: 1,197
Default

Okay, here's a version that will do everything I think you intended this sample to do. I will explain better tomorrow if you have any questions, but the important thing is:

1. Using {} to wrap a string across multiple lines only works if everything contained within the {} is just text. If you want to use variables, you can't wrap the string across multiple lines. This was the problem with your insert statements.[br][file=../../e107_files/public/1164606101_49_FT1992_forum_sql.zip]1164606101_49_FT1992_forum_sql.zip[/file]
Reply With Quote
  #5  
Old 11-27-2006, 07:51 AM
dennishea dennishea is offline
Senior Member
 
Join Date: Oct 2006
Posts: 162
Default

Thanks again for your time. I think I understand what you did and how it works. The showmessage(sql$) helped alot in button101.

Denny
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:13 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright (c) ArianeSoft Inc.
Copyright © 2009 www.ppl-lang.com - All rights reserved
Web Design by BR Web Consulting Ltd