Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Accessing powerhome database externally Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
erl11
Newbie
Newbie


Joined: December 22 2007
Online Status: Offline
Posts: 9
Posted: December 23 2007 at 08:16 | IP Logged Quote erl11

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 View erl11's Profile Search for other posts by erl11
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: December 30 2007 at 21:39 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
erl11
Newbie
Newbie


Joined: December 22 2007
Online Status: Offline
Posts: 9
Posted: January 03 2008 at 16:24 | IP Logged Quote erl11

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 View erl11's Profile Search for other posts by erl11
 
crisx
Groupie
Groupie
Avatar

Joined: September 14 2006
Location: United States
Online Status: Offline
Posts: 72
Posted: January 03 2008 at 17:21 | IP Logged Quote crisx

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 View crisx's Profile Search for other posts by crisx
 
erl11
Newbie
Newbie


Joined: December 22 2007
Online Status: Offline
Posts: 9
Posted: January 03 2008 at 21:28 | IP Logged Quote erl11

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 View erl11's Profile Search for other posts by erl11
 
onhiatus
Senior Member
Senior Member
Avatar

Joined: May 12 2004
Location: United States
Online Status: Offline
Posts: 279
Posted: January 04 2008 at 11:55 | IP Logged Quote onhiatus

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 View onhiatus's Profile Search for other posts by onhiatus Visit onhiatus's Homepage
 
erl11
Newbie
Newbie


Joined: December 22 2007
Online Status: Offline
Posts: 9
Posted: January 04 2008 at 12:13 | IP Logged Quote erl11

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 View erl11's Profile Search for other posts by erl11
 
cmhardwick
Senior Member
Senior Member
Avatar

Joined: July 08 2006
Location: United States
Online Status: Offline
Posts: 290
Posted: January 04 2008 at 16:16 | IP Logged Quote cmhardwick

Access will also accept direct SQL queries if you're more comfortable with using the language.

__________________
Cicero, Enjoying automation!
Back to Top View cmhardwick's Profile Search for other posts by cmhardwick Visit cmhardwick's Homepage
 
eHomeCreations
Groupie
Groupie


Joined: February 02 2007
Location: Ukraine
Online Status: Offline
Posts: 64
Posted: January 09 2008 at 13:45 | IP Logged Quote eHomeCreations

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 View eHomeCreations's Profile Search for other posts by eHomeCreations Visit eHomeCreations's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum