• Welcome, Guest. Please login.
 
August 20, 2019, 08:29:21 pm

News:

Welcome to the SQLitening support forums!


Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Fredrick Ughimi

586
Hello,

Been waiting to get to this point for a while now - An opportunity to start using SQLite Client/Server. Just landed a contract to develop an inventory program for a small pharmacy outfit. I would be asking some basic questions as I move along. Hope you would be patient with me.  ;D

First of, I am having problems with Adding table/index in my database. I get error 1. Here is my code snippet: Mostly Paul's sample codes.



sDatabase = "PharmacyProDB.db3"
   
       StartAgain:
     
       sql3_StartSession hSession, 0   ' do not use Unicode support

       sSQL = "SERVER = localhost; PORT = default; UID = pss234; PASSWORD = sqlrocks"
       errcode = sql3_connect( hSession, sSQL )
       If errcode Then
          MsgBox "Error:" & Str$(errcode) & " during sql3_connect.":  GoTo ExitOut
       End If
       
       errcode = sql3_Use( hSession, sDatabase, %SQL3_REMOTE)
       If errcode Then
          MsgBox "Error:" & Str$(errcode) & " during sql3_use.":  GoTo ExitOut
       End If
   
       sSQL = "CREATE TABLE [tblLogin] ( "   & _
               "[Username] Text Primary Key, "  & _
               "[Password] Text, "          & _
               "[Status] Text; "     & _
       "Create INDEX [Usernamendx] On [tblLogin] ([Username]);"               
       errcode = sql3_exec( hSession, sSQL )
       If errcode Then
          MsgBox "Error:" & Str$(errcode) & " during sql3_exe (Adding table/index).":  GoTo ExitOut
       End If

      ExitOut:

       If hSession Then
          If rs Then sql3_rsDestroy hSession, rs
          sql3_Disconnect hSession
          sql3_EndSession hSession
       End If
   


From the sql3routine file it says error 1 is means - "SQL error or missing database". Hmm... I also get the same error when I run the sample_create.bas file.

Best regards,
587
Hello Mark,

Downloaded the latest version and tested. It worked just like you said.

Great job!
588
Hello Mark,

This is great! Took time out to play around with it. Converted some of my Cheetah data files to SQLite. It worked great.

Are we expecting an updating of the tool soon.  ;)

Thank you for sharing.
589
Hello Paul,

>>Sorry about that. I have re-uploaded the SQLite C/S package with the
correct client DLL for everyone else to use.

Thank you for all your efforts.

Kind regards,
590
Hello Mark,

This is great. I remember I once had a discussion with Paul about converting Cheetah Files to Sqlite.
This tool will really come in handy.

Thank you for sharing.

Regards,


591
Hello Paul,

You are right Paul, only when you use codes to create your table.

I tried a different scenerio and it worked differently.

I discovered that the Server hugs the Database when the table is created
using SQLite Expert Personal or any other tool. But if the table is
created using codes the huging never occurs.

Hmm...

Best regards,

592
Hello Paul,

>>Actually, I just tried a test withe Sqlite Expert Personal and I don't get a locking error?

Hmm.... strange. Its still locked here. I used Sqlite Expert Personal  to create the DB and table. Here is my code snippet:


sDatabase = "BankPro.db3"
    If Dir$(sDatabase) > "" Then Kill sDatabase

   
    '//  START A SESSION (creates the gSession memory)                                         
     errcode = sql3_StartSession(gSession, %False)
     
    sData = "SERVER = localhost; PORT = default; UID=PSS234; PASSWORD=MyPassword"
   
    errcode = sql3_connect( gSession, sData )
    If errcode Then
       MsgBox "Error" & Str$(errcode) & " trying to connect to server."
    End If   
   
errcode = sql3_Use( gSession, sDatabase, %SQL3_REMOTE)
If errcode Then
   MsgBox "Error" & Str$(errcode) & " trying to use database."
End If   
593
Hello Paul,

I have been trying out SQLite Client / Server for about two days.

I can connect to the server, add records, etc. The problem is that each time
I want to view the entered records using Sqlite Expert Personal or any other tool I get "the database file is
locked". I would  have to stop the server manually before I can view the records.
I thought sql3_disconnect gSession would do that.

Am I missing something?  ???

Best regards,
594
Hello Mike,

>>Sure are a lot of lurkers based upon the number of people who have read this thread.
352 as of this posting.

Now 416 with this. ;D Wish we could be of help like you are doing.

Well done Paul and Mike.  :)

Best regards,
595
Hello Mike,

>>Resent.  Did you get it?

Thank you. Got it at last when you used fughimi@yahoo.com. Thank you.

>>In the upper corner of each forum did you click on notify so you know when people respond?

Some times I do that. Not in this case.

>>Note, clicking on your url link (on this site) doesn't work because
planetsquires/support prefixes it for some reason.

Just fixed it. Thank you for bringing it to my notice.

>>Also noticed you have a third email address at contact at meganetcomputers.net (sent a message there, too)
It came back undeliverable.

Its now deprecated. I have removed it. I thought I did that sometime ago.

>>Just found another email for you at hotmail.

Openned that to be able to chat with my cousins using hotmail in the US before the collaboration b/w Yahoo and Microsoft.

>>What is your email address?

I prefer you use support@ughimisoft.com or fughimi@yahoo.com.

Thank you for the file and your observations.

Best regards,













596
Hello Mike,

Thank you.

I just check. Hmm... there was nothing like that.

Please, kindly resend it. I don't know what happened.

Best regards,
597
Hello Mike,

>> I have  DDT client test code if anyone is interested.

I would be glad to have them. Thanks in advance.

Best regards,
598
Hello Paul,

Just to let you know that I am one of those waiting anxiously for the successful completion of this project. From your post you seems to be going quite well. Edwin Knoppert might be of help in these project 'cos he included some SQLite wrapper functions in PwrDev since version one of that IDE. I feel he knows some stuff about SQLite. Just a suggestion.

Thanks Paul, we are all benefiting from your programming genius.

Best regards,