Author |
|
erl11 Newbie
Joined: December 22 2007
Online Status: Offline Posts: 9
|
Posted: December 23 2007 at 08:16 | IP Logged
|
|
|
Hi, I would like to know if it is possible to access and run queries against the powerhome database. I know the database is stored at
C:\Program Files\powerhome\Database\pwrhome.db
I would like to make a connection to the db via visual basic. I ultimately would like to run a query that would return all insteon device ids that respond to a given group id.
Any help in making the initial connection would be appreciated… What type of database it? Any username password? Connection string?
Thanks, erl
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: December 30 2007 at 21:39 | IP Logged
|
|
|
erl, Welcome to PowerHome!
This reply is coming a little late so you may have already figured it out.
PowerHome's database is currently a Sybase Adaptive Server Anywhere 7 database. Easily accessible via ODBC. Just choose the ASA 7 driver and use a userid of PH with a password of PH.
Hope this helps,
Dave.
|
Back to Top |
|
|
erl11 Newbie
Joined: December 22 2007
Online Status: Offline Posts: 9
|
Posted: January 03 2008 at 16:24 | IP Logged
|
|
|
Thanks Dave,
I am still having some problems though. My plan is to create an ODBC data source and then link the PH database to MS Access so that I can get an idea of the design of the database and write the query I need. Then I want to use an ADO connection from VB.
I could not find the ASA 7 driver anywhere on the internet, including Sybase’s website (and I do not see it under the drivers tab in ODBC Data source Administrator) , do you have a link to the driver install? Also would you mind giving me some direction on any other fields I would need to set up an ODBC connection?
|
Back to Top |
|
|
crisx Groupie
Joined: September 14 2006 Location: United States
Online Status: Offline Posts: 72
|
Posted: January 03 2008 at 17:21 | IP Logged
|
|
|
Erl,
until Dave gets back to you, this might get you started (down towards the bottom):
Link
There are a couple of step-by-step examples. Not sure why the ASA 7 driver doesn't show up for you - every time I have tried it, it is the first option in the list (after clicking 'add' in the ODBC dialog under both XP and Vista. What OS are you running?
Cris
|
Back to Top |
|
|
erl11 Newbie
Joined: December 22 2007
Online Status: Offline Posts: 9
|
Posted: January 03 2008 at 21:28 | IP Logged
|
|
|
Crisx,
Thanks for the link. I am running vista 64bit, and after doing some searches I found out that you need to run the 32bit version of the ODBC administrator. This is located at C:\Windows\SysWOW64\odbcad32.exe
Once I got in there I was able to create a powerhome DSN. I added the username, pw, and database location, but this still did not work from ms access. Finally I tried launching PH and as long as it is running, I was able to get in. Somehow PH must be opening the db where ms access can’t. (even thought I have the option to “automatically start the database if it isn’t running” checkbox checked on the database tab in ODBC config) but I’m in for and will deal with this later, since at one point I am going to want to access the db without PH.
In the mean time I can’t seem to find a table that shows me insteon links..
Dave, can you point me in the righ direction? thx
|
Back to Top |
|
|
onhiatus Senior Member
Joined: May 12 2004 Location: United States
Online Status: Offline Posts: 279
|
Posted: January 04 2008 at 11:55 | IP Logged
|
|
|
While were at it, is it possible to connect to a Sybase Adaptive Server Anywhere 7 database via a query / explorer tool? Something like SQLyog (for MySQL)?
It's always easier to work out my DB queries using a tool like this.
|
Back to Top |
|
|
erl11 Newbie
Joined: December 22 2007
Online Status: Offline Posts: 9
|
Posted: January 04 2008 at 12:13 | IP Logged
|
|
|
onhiatus,
I'm not sure how sophisticated it is compared to SQLyog but it is pretty easy to build queries using microsoft access. There are wizards, plus a design view which is drag and drop.
|
Back to Top |
|
|
cmhardwick Senior Member
Joined: July 08 2006 Location: United States
Online Status: Offline Posts: 290
|
Posted: January 04 2008 at 16:16 | IP Logged
|
|
|
Access will also accept direct SQL queries if you're more comfortable with using the language.
__________________ Cicero, Enjoying automation!
|
Back to Top |
|
|
eHomeCreations Groupie
Joined: February 02 2007 Location: Ukraine
Online Status: Offline Posts: 64
|
Posted: January 09 2008 at 13:45 | IP Logged
|
|
|
Take a look Here
This is how to set up a DSN to PH that will work with the ADO and VB.
__________________ --Steve http://www. ehomecreations.com
|
Back to Top |
|
|