Bruce Steele wrote:
I’m a very new “C” programmer working on a program
< to look up information from a SQLite created data
< base. The data base is made up of information on
< models of Harley Davidson motorcycles. I want to
< do a search of the data base using input from the
< “user”. For instance the user wants to know what
< model of motorcycle is a “FLSTCI”. They would type
< that in and my “C” program will then access the
< data base and return “That is a Heritage Softail
< Classic”.
<
< My problem is can’t see a way to pass the user input
< to my select statement.
< Can this be done?
< Is it SQL or C or a combination?
< Or I going about this all wrong?
<
< Like I said I’m very new and just trying to learn.
< Thanks for your help. Just point me in the right
< direction and I’ll figure it out, Thanks again.

For somebody who is beginning, C is a tough way to
start.  You might want to consider one of the more
forgiving languages at first, such as Python, Perl,
Java, or (on the Windows platform) C# or Basic.Net.

Given that you are set on using C, you could study
the program distributed with the amalgamation, in
a file named 'shell.c'.  It does, among other things,
the very actions you describe.

Of course, you will want to do some input parsing
and string manipulation to transform your program's
user input into queries and format the results.  In
C, that is a tricky process for beginners.  Do web
searches for "C string functions" and "C string
parsing" to see how such things are commonly done.

Good luck.
--
Larry Brasfield
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to