PDA

Click to See Complete Forum and Search --> : Problem with DataEnvironment


Jul 4th, 1999, 02:52 PM
In my VB Application Ive a DataReport with a DataEnvironment as Data Source.
On my development computer everything works fine.
But on every other machine I get an Error No. 713 something like "Application or object oriented error" when I try to change the DataEnvironment.Connection property (to choose the Database)

Hope somebody can help me!

Etoscha

nrj
Jul 5th, 1999, 12:36 PM
If you're gonna use DE you're in for a lot of trouble. Convert as quickley as possible to the ADO Object model instead. It's Better.

//Niklas J, Professional VB Developer (MCP)


[This message has been edited by nrj (edited 07-06-1999).]

nrj
Jul 5th, 1999, 01:22 PM
I've been looking a little bit more into your problem. I suggest that instead of using the Data Environment you should Assign a Recordset to The DataSource property of the DataReport. I tried this:

Private Sub Command1_Click()

Dim conCD As New ADODB.Connection
Dim rsCD As ADODB.Recordset
conCD.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=e:\msdn cd\index.mdb"
conCD.Open
Set rsCD = New ADODB.Recordset
rsCD.Open "SELECT * FROM cd_assys", conCD, adOpenDynamic, adLockPessimistic, adCmdText

Set DataReport1.DataSource = rsCD

DataReport1.Show

End Sub

Don't forget to make a referens to Microsoft Active Data Objects first. And assign a DataField name for the text box in the report.

//Niklas Jarl

Jul 8th, 1999, 10:14 AM
Thank you very much!

Etoscha