Re: Upgrading Pervasive 2000i to V9
- From: "Bill Bach" <goldstar@xxxxxxxxxxxxx>
- Date: Wed, 11 Jan 2006 17:02:09 -0600
Is this data type (as defined in the DDF's) a CHAR or VARCHAR field?
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach@xxxxxxxxxxxxxxxxxxxx
http://www.goldstarsoftware.com
*** Chicago: Pervasive.SQL Service & Support - March, 2006 ***
*** Chicago: Pervasive DataExchange Class - March, 2006 ***
Chris Smith wrote:
> Hi,
>
> I am in the process of testing our applications that currently use
> PSQL2000i on PSQL9. The applications that use the Btrieve API work
> (as you would expect) however I am having difficulties with
> applications that access the data using OLEDB.
>
> Code currently working on PSQL2000i
>
> Function cstest()
> Dim cnn As ADODB.Connection
> Dim rst As ADODB.Recordset
> Const connstring As String = "Provider=PervasiveOLEDB;Data
> Source=\\server\pathtoddffolder;Persist Security Info=False"
> Set cnn = New ADODB.Connection
> cnn.Open connstring
> Set rst = New ADODB.Recordset
> rst.Open "SELECT * FROM INVOICE_HEADERS WHERE
> Customer_Name='Customer'",cnn, adOpenDynamic, adLockReadOnly
> rst.MoveFirst
> Do
> MsgBox rst!Customer_Name
> rst.MoveNext
> Loop Until rst.EOF = True
> rst.Close
> cnn.Close
> Set cnn = Nothing
> End Function
>
> However, to get the same results on PSQL9 I have to ammend the code to
>
> Function cstest()
> Dim cnn As ADODB.Connection
> Dim rst As ADODB.Recordset
> Const connstring As String = "Provider=PervasiveOLEDB.9.11;Data
> Source=DatabaseName;Location=Server;Persist Security Info=False"
> Set cnn = New ADODB.Connection
> cnn.Open connstring
> Set rst = New ADODB.Recordset
> custname = "Customer"
> custname=custname& Space((50 - Len(custname)))
> rst.Open "SELECT * FROM INVOICE_HEADERS WHERE Customer_Name='" &
> custname & "'", cnn, adOpenDynamic, adLockReadOnly
> rst.MoveFirst
> Do
> MsgBox rst!Customer_Name
> rst.MoveNext
> Loop Until rst.EOF = True
> rst.Close
> cnn.Close
> Set cnn = Nothing
> End Function
>
> Changing the connection string is easy enough but I have to space out
> the field used in in the WHERE clause to match the field size in the
> table structure.
>
> This spacing out is also necessary when I try and execute a SQL
> statement in the PCC.
>
> Is there any option, registry modification etc that will allow
> execution of the SQL statements without the modification of the
> variable used in the WHERE clause.
>
> Many thanks for your anticipated help.
>
> Chris
.
- Follow-Ups:
- Re: Upgrading Pervasive 2000i to V9
- From: Chris Smith
- Re: Upgrading Pervasive 2000i to V9
- References:
- Upgrading Pervasive 2000i to V9
- From: Chris Smith
- Upgrading Pervasive 2000i to V9
- Prev by Date: Btrive time fields in Crystal Report dont display properly
- Next by Date: Re: Btrive time fields in Crystal Report dont display properly
- Previous by thread: Upgrading Pervasive 2000i to V9
- Next by thread: Re: Upgrading Pervasive 2000i to V9
- Index(es):
Relevant Pages
|