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

Stop Paradox asking for Password

Status
Not open for further replies.

woodyinoz

IS-IT--Management
Jan 8, 2002
215
GB
Hi all,

I am using Paradox 8, SQL Server 8 (2000), BDE 5.1, ODBC connection.

I have a form with a field from a SQL Server database upon it. Everytime I open the form, I get asked for a password... This is despite having the following code under both the open and the arrive of the form >
Code:
; initialize variables
	aliasName = "sqlsvr"
	aliasPassword = "password" 

	; set alias password and open database
	if setAliasPassword(aliasName, aliasPassword) then
	db.open(aliasName) 
	else
		errorShow("Couldn't set alias password.")
		return
	endIf
Is there another way that I can predefine the password so that I stop the prompt?

Thanks in advance.

Woody
 
Hi again,

Has anyone got any ideas on this one? We're getting a bit desperate at this end!

Thanks,

Woody
 
You might try an alternate syntax:
Code:
var
  db             database
  dyServerParams Dynarray[] String
endvar
dyServerParams["USER NAME"]="SYSDBA"
dyServerParams["Password"]="masterkey"
db.open(":cbdata:",dyServerParams)
Also, what brand of SQL Server? M$? Interbase? ??

Tony McGuire
"It's not about having enough time. It's about priorities.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top