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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to a database using ODBC to drop a table

Status
Not open for further replies.

sjwales

MIS
Jun 24, 2003
61
US
We have a third party application that runs on an Oracle 8.1.7 database on HPUX 11.0. As a part of this application, there is a SQL Server database that replicates, using some function of SQL Server, certain data from the Oracle DB into the SQL Server DB.

From time to time the power goes out at the remote site, or something else happens that upsets the replication.

This leaves a temporary table in the Oracle database called MSREPL7. Microsoft's replication engine apparently tries to create this table from scratch every time it goes to replicate and if the table is there, the replication fails.

What I'd like to do is write a small Delphi program, that connects to the Oracle database as the schema owner and issues a "DROP TABLE MSREPL7".

My two problems at the moment: How to connect to an ODBC Data Source from within Delphi (I've never done this before) and how to configure it so that the remote users don't have to know the schema password - can this be coded through? I don't know if it can because my experience in the past is that when you set up an ODBC datasource, you need to provide a username and a password as part of the ODBC setup.

Anyone able to lend me a hand here?

Thanks
Steve

stephen.wales@riotinto.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top