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

StringConnection for Pervasive SQL Server

Status
Not open for further replies.

kosta

Programmer
Feb 9, 2001
186
CA
Hi,
i need StringConnection for Pervasive SQL Server .
TIA

Soykan OEZCELIK
 
You can create a stringconnection by:
From start, run type: notepad pervassive.udl
Then close the file with nothing in it.
Then from start, run type: pervassive.udl
Select the provider tab and select the driver for pervassive.
Then select the connection tab and fill in the fields.
After clicking ok you can:
From start, run type: notepad pervassive.udl
There should now be a string you can copy to your stringconnect command.
 
Thanks
robsuttonjr

i wantto connect without ODBC relation just string connection may be via OLEDB or ODBC again

i've tried to create UDL and it gives like below string

DSN=xl3;ServerName=w2000srv.1583;ServerDSN=xl3;UID=w2000srv;ArrayFetchOn=1;ArrayBufferSize=8;TransportHint=TCP:SPX;TranslationDLL=C:\PVSW\Bin\w32btxlt.dll;DecimalSymbol=,;

would you like to write to here sample connection string for me. eg .let the table name customers

TIA

Soykan OEZCELIK
 
Kosta

Here a bit of code that I use to address a Pervasive database.
Code:
csqlstr="SELECT * FROM AROBL Arobl "+;
	"WHERE (Arobl.TRXTYPETXT = 3 AND  Arobl.cntbtch > ?nbatchno) or (Arobl.dateinvc>='"+;
	ALLTRIM(cdatelast)+"'and Arobl.TRXTYPETXT =3 ) "+;
	"ORDER BY Arobl.IDCUST"
STORE SQLCONNECT(lcaccpacdata, 'sa') TO gnconnhandle
IF gnconnhandle <= 0

	RETURN
ELSE
	= sqlsetprop(gnconnhandle, 'asynchronous', .F.)
	= sqlexec(gnconnhandle,csqlstr, 'viewaccpaccr1')
ENDIF
= sqldisconnect(gnconnhandle)


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Kosta

BTW my suggestion assumes that your ODBC is already established.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
is there any other way to connect without established ODBC ?

Soykan OEZCELIK
 
Kosta

is there any other way to connect without established ODBC ?

None that I know of.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
You don't have to have an established ODBC or as I see you thinking, 'DSN'. Just insert the line from the .UDL file into the STRINGCONNECT() function. The key to creating the right information for the stringconnect is to not select the dsn but set it up from scratch in the udl window. Then you can create a dsnless connection. This means you merely have to have the driver installed on each workstation but don't have to setup a dsn on each machine. In my application I use SQL server and everybody has sql server driver. I also use pervassive and anybody who uses pervassive will have the pervassive driver.

 
robsuttonjr ,
i've tried that created UDL string but it gives error

Soykan OEZCELIK
 
It would help to know what version of pervassive you are using. I use pervassive 7.0 and 2000 so I could generate the stringconnect for you if you have either of those.
 
my version Pervasive SQL 2000i and if you send generated stringconnect with vfp sample it will be very apreciated.

TIA

Soykan OEZCELIK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top