If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > parent/child commands, shape, and Pervasive

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-25-04, 15:40
zharrison zharrison is offline
Registered User
 
Join Date: Sep 2004
Posts: 8
parent/child commands, shape, and Pervasive

Hello again,
I am trying to execute a command object and pass the recordset to the Microsoft DataReport object.
This works until I try to use the "Shape" syntax to create parent/child commands. Depending on the connection object's connection string, I get either "automation error" or "syntax error" (the syntax error points to the 'shape' part of the command text).
Can you use the 'shape' syntax with Pervasive SQL 2000i?

Here is the code:

Dim rs1 As ADODB.Recordset
Set rs1 = New ADODB.Recordset

Dim deCon As ADODB.Connection
Set deCon = New ADODB.Connection
Dim deCmd As ADODB.Command
Set deCmd = New ADODB.Command

'deCon.ConnectionString = "Provider = PervasiveOLEDB;Data Source=StarTracer;Password=jfltlc;User ID=Master;Persist Security Info=True"
deCon.ConnectionString = "DSN=StarTracer;Pwd=MyPwd;UID=MyUid"
deCon.Open

deCmd.ActiveConnection = deCon
deCmd.CommandType = adCmdText
deCmd.CommandText = " SHAPE {select * from people} AS Command1 APPEND ({select * from txcash} AS Command2 RELATE 'PeopleID' TO 'PeopleID') AS Command2"

Set rs1 = deCmd.Execute
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On