Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2

Thread: Wrong direction

  1. #1
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939

    Oops Wrong direction

    I have tried to study the SQLite plugin (from previous experience I know the strength of SQL queries). The first step was to create some tables (from text files). By means of the plug-in help file, I succeeded with an user defined function easy to use. Then I wanted to display a specific row, let's say number 215. It’s like “going to Sweden” when you “live in Norway” – then you have to go eastwards.

    I started with a SQL Query "select * from "..cTable; (selected all rows!). Continued with SQLite.Compile(), then SQLite.Query() with CallBack Function with tbRowDataArray where I tested for nRow == nPrm. OK, I came to Sweden, but afterwards I discovered that I had went west, passed Rankin Inlet on my way round the world, until I arrived in Sweden.

    This is more efficient:
    sql="select * from "..cTable.." where rowid = "..nPrm;
    tblRec = SQLite.QueryToTable(db, sql);
    IN tblRec I HAVE ALL WHAT I NEED!

    When I started with AMS, “tables” was an important issue. I read the docs, and tried again. Read the docs, and tried again. Not until I had played through Coreys CD#3 “Tables Made Easy”, the idea was clear.

    Why these words? To tell that I miss the Plug-In CD with “SQLite Databases Made Easy”. I still miss my early morning lessons with “Corey on my ear”, but this forum supplies the want.

  2. #2
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Quote Originally Posted by csd214
    I have tried to study the SQLite plugin (from previous experience I know the strength of SQL queries). The first step was to create some tables (from text files). By means of the plug-in help file, I succeeded with an user defined function easy to use. Then I wanted to display a specific row, let's say number 215. It’s like “going to Sweden” when you “live in Norway” – then you have to go eastwards.

    I started with a SQL Query "select * from "..cTable; (selected all rows!). Continued with SQLite.Compile(), then SQLite.Query() with CallBack Function with tbRowDataArray where I tested for nRow == nPrm. OK, I came to Sweden, but afterwards I discovered that I had went west, passed Rankin Inlet on my way round the world, until I arrived in Sweden.

    This is more efficient:
    sql="select * from "..cTable.." where rowid = "..nPrm;
    tblRec = SQLite.QueryToTable(db, sql);
    IN tblRec I HAVE ALL WHAT I NEED!

    When I started with AMS, “tables” was an important issue. I read the docs, and tried again. Read the docs, and tried again. Not until I had played through Coreys CD#3 “Tables Made Easy”, the idea was clear.

    Why these words? To tell that I miss the Plug-In CD with “SQLite Databases Made Easy”. I still miss my early morning lessons with “Corey on my ear”, but this forum supplies the want.
    I would buy Speedy Training - SQLite - volume 4 in a heart beat!

    Worm helped me yet again on a SQLite query. If this keeps up I will have to put Worm on retainer!

    What I was trying to accomplish was that I wanted to have only one instance of a last name in a Listbox Object. So, I was ding like you and "select * from TABLENAMEHERE" routine.

    I spent several hours with no workable solution. Finally I messaged Worm and asked him how to delete the duplicate last names that are populating my Listbox (on more than one page).

    Worm replied within five minutes (wow) and he had one line of code to offer. I looked it over and sure enough it worked. As a matter of fact it just replaced one character with two words!

    Here is the line that works:

    tblRecords = SQLite.QueryToTable(customerdb, "Select Distinct lastname from CUSTOMERS");

    I had:

    tblRecords = SQLite.QuerytoTable(customerdb, "Select * From CUSTOMERS");

    Worm, your one heck of a guy! Thanks again!

    Very Sincerely,
    Last edited by Intrigued; 08-20-2004 at 11:33 AM.
    Intrigued

Similar Threads

  1. what is wrong with this script??
    By Martin_SBT in forum AutoPlay Media Studio 5.0
    Replies: 5
    Last Post: 12-05-2003, 01:25 PM
  2. Does anyone know what I am doing wrong?
    By Scampula in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 12-05-2003, 04:12 AM
  3. Create Service (Password wrong!?)
    By BJU in forum Setup Factory 6.0
    Replies: 2
    Last Post: 02-04-2003, 11:01 AM
  4. NEED HELP ON A MESSAGE AFTER A WRONG PASSWORD
    By dragon in forum AutoPlay Menu Studio 3.0
    Replies: 0
    Last Post: 02-21-2002, 11:11 PM
  5. Something wrong with install images.!!!
    By vesta in forum Setup Factory 6.0
    Replies: 5
    Last Post: 02-03-2002, 02:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts