Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create Firebird database and connection automatically
Message
De
24/01/2005 16:58:02
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
How to create Firebird database and connection automatically
Divers
Thread ID:
00980204
Message ID:
00980204
Vues:
66
I want to create Firebird database and connect to it without user intervention.
I try to use Dorin Vasilescu firebird_api.zip from UT file area.

Problems:

1. ODBC login prompt appears. How to avoid it ?

2. After filling login prompt with any data, access is denied error occurs.
oFB = NEWOBJECT('firebird', 'firebird.prg')

 IF !oFB.CreateDB('c:\demo.fdb') 
   MESSAGEBOX('Database creation failed '+ CHR(13)+ ofb.output )
   RETURN .f.
   ENDIF
 
cConnStr=  "DRIVER=Firebird/InterBase(r) driver; UID=SYSDBA; PWD=masterkey; " + ;
   "DBNAME=c:\demo.fdb;"

lnConnHandle = sqlstringconnect( cconnstr )

IF lnConnHandle <= 0
  AERROR(laError)
  * access is denied error occurs here
  MESSAGEBOX(  laerror[1,2] )
  ENDIF
Andrus
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform