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

ODBC Connection without manual intervention?

Status
Not open for further replies.

SercoSteve

Programmer
Sep 25, 2002
44
GB
I am attempting to connect to a Server using ODBC from a Paradox 8 Script. The script runs fine and connects to the server, however the first thing it does is display a dialog box requesting server information. I dont need to enter the information I just hit <CR> and it connects successfully.

Does anybody know a way of connecting to a server, using ODBC, without displaying the dialog box? The script is going to run as a sheduled task on my machine, when complete, and must be free of manual intervention.

Thanks in advance.

Steve
 
Steve:

Unfortunately, I don't have a solution to your problem, but I would appreciate your help. I am trying to insert records into a SQL Server table that have been processed in Paradox via an ODBC connection. It's fairly simple to create a system DSN, but I have little knowledge in creating a script to do the actual insert. Do you have any sample script that does that?? Please advise.. Thanks, newtechy..
 
newtechy:

As far as I am aware you can create an alias to your ODBC Server and insert/post recrods in the usual way. The actual location of the machine is of no consequence.

We have worked out how to connect to the server automatically, we create an alias and use it to run a query on server data the result of which is stored on a local machine.

Be advised I am new to Paradox myself so I may be wrong.

Steve
 
to avoid the password prompt, just do the following steps:
1) declare a variable at the form level:
var
db database
endvar
2) at the page open action, set the alias password.
setAliasPassword(&quot;Aliasname&quot;, &quot;password&quot;)
db.open(&quot;Aliasname&quot;)


Note: as long as db is define/instantiated, odbc connection is open. You can then open any table in any form without getting the password prompt.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top