Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi! Long time since I was here. Bu

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi!
Long time since I was here. But I don't do too much with VFP since I'm retired.
For home automation I m using Domoticz. Domoticz keeps track of all data using a SQL light3 database.
I want to be able to proces the database-tables and preferably using VFP.
I managed to create a connection thanks to Wil Hentzens publications:
in short
STORE SQLCONNECT('Connect1') TO gnConnHandle
IF gnConnHandle <= 0
= MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error')
ELSE
= MESSAGEBOX('Connection made', 48, 'SQL Connect Message')
STORE SQLTABLES(gnConnHandle, 'TABLE', 'mycursor') TO nTables
? nTables
IF nTables = 1

SELECT mycursor

brow

remaining code kept away

Now I get a browse window which has a memo field Table_name.
So I can see all tabe names.
But how do I connect to a table ? I like to update columns and delete some of them.
Can I treat those tables as VFP tables in a way ?

Thanks for your help

-Bart
 
Now that I read the database is for a home automation, I wouldn't drop columns, for example, you just risk the hardware relying on the data structure to error, don't you?
Or did you design this database yourself and it's the basis of what you do in Domoticz?

Chriss
 
It was my fault as i forgot the subject. As far as can seen that couldnot been updated and I also couldnot delete this one.
Bart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top