Testing ODBC connection on a windows machine

Hi EE

I imported in a odbc from registry of another machine, both machines are Windows 7. Is there a way to test the odbc connection? Similar to how you can open up a cmd window connect to a DB2 database and issue some simple SQL command.

I rather not write code etc if not required.

thx
LuckyLucksAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saurabh Singh TeotiaCommented:
I'm assuming you are looking for This.....

In additional you can check for connection by -->Test Connection feature which is there in Control Panel ---> Administrative Tools--- > Data Sources.

Saurabh...
0
LuckyLucksAuthor Commented:
Please do not place links unless its the full url. Kindly expand.
0
Saurabh Singh TeotiaCommented:
Here you go..its a fully url..

http://www.sqledit.com/odbc/runner.html

Saurabh...
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

LuckyLucksAuthor Commented:
This is a feww download software. Is there another way to do it w/o downloading tools not from Microsoft?
0
Saurabh Singh TeotiaCommented:
You can do so by doing this in settings of windows only...

By going in  Control Panel ---> Administrative Tools--- > Data Sources -->select a particular data source and test connection in it..
0
LuckyLucksAuthor Commented:
Also does creating a ODBC connection through the Control Panel / Administrative Tools not persist after the user closes the session or porgram? Why so?
0
Saurabh Singh TeotiaCommented:
Okay the odbc connections or drivers which you see in their are the connectors..Users use this connectors to connect through different Microsoft programs and these act as a enablers or service providers todo so..

Now when a user closes the session or program it depends upon if he is disconnecting it from their properly as by using the same access connector i can have multiple connections to different database, Now in my program i need to set them correctly where i first disconnect from them and then post disconnecting i clear the cache memory of the system as well by setting them to nothing...
0
Dave BaldwinFixer of ProblemsCommented:
All SQL type servers (including DB2, Oracle, MS SQL, MySQL, and PostgreSQL) require an external program to access them.  They are server and not desktop user programs.  And since there are always a limited number of connections available, the drivers will drop the connection when it is no longer used.  Drivers in many languages like ASP and PHP will automatically close the connection when the script is done.
0
LuckyLucksAuthor Commented:
Ok so here where that thought takes me - If the odbc connections created from Contraol Panel + Administrative Tools, dies once the user ends their program session, then does that mean the its not saved in the registry in the first place?

Also, how can I get the odbc to premanently save so that every time a user opens an app, its automatically connected to the same database?
0
Dave BaldwinFixer of ProblemsCommented:
I think you're confusing two things.  'Persist' means that the connection is maintained all the time and it is not.  'Saved' in the ODBC setup is normal and usually contains a connection to a specific database so that every time they 'open' that ODBC connection they get the same database and connection.  But when the program quits, the connection is closed.  But it is not 'lost' from the ODBC set up.  It is still there waiting to be used again.
0
Saurabh Singh TeotiaCommented:
ODBC is like connector..it stays their..let me put this way you are charging your laptop through charger..Now when you put the plug off the charger is still their as it acts as a connector between the plug and laptop...Same goes for ODBC settings, it remains their, However you can use it multiple times..
0
LuckyLucksAuthor Commented:
Dave, does the COntrol Panel + Administrative Tool 'save' the odbc? The users will not have admin permissions on their machines to set the odbc every time the create a report from the program.
0
Dave BaldwinFixer of ProblemsCommented:
Yes, the connection is saved to be used later.  You / they do not have to set it up every time they need to use it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.