• Welcome to SQLitening Support Forum. Please login.
 
December 03, 2021, 07:06:16 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 - Marc Giao

16
Hi Gary,

Assume the table is called "tbl_ids" and the fields contain strings, then it would be as follows:


slSel "SELECT * FROM tbl_ids"

slGetRow
a$ = slFN("FamilyID")
b$ = slFN("MemberID") 
c$ = slFN("TransID")
d$ = slFN("BatchID")
e$ = slFN("EventID")
slCloseSet 'just in case you have more rows and don't know it :)


That's it, hope it helps.

Marc
17
General Board / Re: Merry Christmas!
December 26, 2010, 07:16:38 PM
Ditto from me... Plus I'd like to thank every one for any and all help.
18
Hi Fred,

Thanks for the help, that was the hint I needed. I had not realized the error was from the slFN function  :)

Thanks for the help and a great product.

Marc
19
Hi,

This has me stumped, the following works:
"SELECT * FROM tbl_callrecord WHERE call_link = 0 ORDER BY call_id"

But the following gives me an error -13 (Invalid column name or number, Statement = GetFieldName):
"SELECT call_id FROM tbl_callrecord WHERE call_link = 0 ORDER BY call_id"

Iam obviously missing the obvious, anybody want to help me overcome another senior moment? Please... :)

Added later: Both the above statements work as expected when run on the database in SQLite Expert  ???

Marc
20
 Thanks Fred,

I was thinking of all sorts of ways to solve this but didn't even think about slSet...,slPush.. and slPop  ::) old age is a sad thing, that's my excuse anyway and I am sticking to it  :)

All the best,

Marc
21
Hi All,

When running in local mode slGetFile locates and loads a file from the local PC... perfect.

When running in remote mode slGetFile locates and loads a file from the server... perfect

Is it possible to run in remote mode and somehow get slGetFile to locate and load a file from a local PC? If not how would I load a local file so I can save it as  a blob, while running in remote mode?

Thanks for any help.

Marc
22
Hi Fred,

Thanks for that example... Starting to make sense now :)

I am assuming this example only works if both db_disk and db_men are either local or remote. If one db is local and the other is remote then the following example (also your code) from another thread mus tbe used instead, am I correct?

'http://www.sqlitening.com/support/index.php?topic=2869.15
Sub CopyTable

   Local lsSaveVAlue as String
   Local lsRemoteDB, lsLocalDB as String

   ' Connect, open, and save remote database handle
   slConnect
   slOpen "Test.Sld"
   slPushDatabase lsRemoteDB

   ' Switch libs, open, and save local database handle
   slSetProcessMods "L0"         ' switch to local lib         
   slOpen "C:\SQLitening\Test\TestLocal.Sld
   slPushDatabase lsLocalDB

   ' Create table on local and begin tran
   slPopDatabase lsLocalDB
   slExe "Create Table if not exists T2 (F1)"
   slExe "Delete from T2"
   slExe "Begin"

   ' Switch to remote and select from input table
   slPopDatabase lsRemoteDB
   slSetProcessMods "L1"         ' switch to remote lib     
   slSel "Select F1 from T1"
   do while slGetRow
      lsSaveValue = slFN("F1")

      ' Switch to local and insert
      slPopDatabase lsLocalDB
      slSetProcessMods "L0"         ' switch to local lib     
      slExe "Insert into T2 values(" & lsSaveValue & ")"

      ' Switch to remote for next record
      slPopDatabase lsRemoteDB
      slSetProcessMods "L1"         ' switch to remote lib     
   loop

   ' Switch to local and end tran
   slPopDatabase lsLocalDB
   slSetProcessMods "L0"         ' switch to local lib     
   slExe "End"

End Sub


Marc
23
Hi Fred,

Thanks for the example, looks simple but I am having trouble understanding how to deal with both db's :)

For your example to work don't both db's have to be open? How do you open both db's for this example to work? Do you loose all data if you close the :memory: database?

I was planning on having a table with the same name in both db_disk and db_mem, then query certain data from db_disk to db_mem and close db_disk.

After processing data in db_mem I would like to reopen db_disk and either retrieve more data from db_disk to db_mem or from db_mem to db_disk.

Am I hoping for too much here? I am really confused and probably missing something very basic :)

Marc
24
You've got Questions? We've got Answers! / Using :memory:
December 05, 2009, 01:21:18 PM
Hi,

I want to duplicate certain tables (not the copmlete database) from a disk database in a ":memory:" database, wah is the best way to accomplish this?

I do a query on the disk db, do I then ise slGetRow to process each row and then insert into :memory:?

Thanks for any info.

Marc
25
Nope.

You can edit/create SQLite databases using:

http://www.sqliteexpert.com/

Marc
26
Hi Rolf,

The server is running Server 2008.

Marc
27
Hi Fred,

Still working great and I am still amazed at how simple  and quick it all was, I had fully expected to have to spend a couple of days working on this instead it was all done in a less that two hours. Wow

Quote from: Fred Meier on October 15, 2009, 08:00:20 AM
Could you please report what privileges/permissions you needed to resolve your "lack of privileges" problem?   Thanks

I will not reveal my network/internet ignorance by answering that question ;) When our IT guru is back in the office next week I am going to sit him down in front of a very bright light and interrogate him until I understand, poor guy  ;D I'll report back when I have the details.

Until then, I can tell you what I know and understand: Our server has several drives, I was originally given my own directory on one of the drives (D:\MisApps\SQLitening). I login to the server as myself and was given full privileges to this directory, I can copy, delete, modify etc... all the good stuff. However, on our server only the "administrator" has privileges to "start or stop" services.

I was able install SQLiteningServer using SQLiteningServerAdmin but I was unable to start the service. The only error from SQLiteningServerAdmin was that it couldn't start the server and that if the log file was emply the probable cause was a missing DLL. The log file was empty but the cause was not a missing DLL.

When tried to start the service using Service Manager, however, the error message was a lot more revealing and the "light lit". I can't remember the exact wording but it was something like "you don't have rights to do this".

The other issue was with port 51234, because we operate behind a hardware firewall the port was closed and IT had to open it up for me.

Hope the above helps until I get more info... or you have specific questions.

All the best,

Marc
Basking in "liteninglicious" land
28
Had a chat with the our IT guy and "lack of privileges" was the problem. Once fixed the SQLiteningServer started. Next problem was the firewall, port 51234 was close, IT fixed that one too.

OK, progress report. This part of the effort took longer, a grand to total of 30 minutes including a couple of chats with our IT Guru but considering I know absolutely nothing about networks, the internet and routers, I think it was lightening fast!

Super liteninglicious success... It's working great and fast, tried it from the office, home and several other remote locations and the results are the same at all locations... liteninglicious!  :)

Thanks Fred and Paul, fantastic effort, a stroke of litening! Sorry couldn't resist.

Marc
29
Hi Fred,

Thanks for the feedback.

Quote from: Fred Meier on October 13, 2009, 05:36:42 PM
Could there be some security problem or lack of privilege to start a service?

This is where I am putting my money right now...

Marc
30
Hi Fred,

No, nothing, the log fine is completely empty.

I copied all the files from my local PC to the same directory on the server, then ran SQLServerAdmin.exe and it installed, then I clicked start and got the message that the server couldn't start and that if the log file was empty, it's probably caused by a missing DLL.

If I understand this correctly the only dll's required on the server side are SQLite3.DLL and ZLib.DLL and both are in the same directory as SQLServerAdmin.exe.

If I just run SQLServer.exe it appears to spool to SQLServerAdmin.exe, when I click start I get the same message as above.

I did copy the cfg file over but didn't modify, I reasoned that I'd try and get it running in LocalHost first then modify it as required. Is this a problem?

Aside from the two DLL'd mentioned above is there another that the exe finds on my PC but not on the server?

Thanks,

Marc