Results 1 to 4 of 4

Thread: Problem with DataEnvironment

  1. #1
    Guest

    Post

    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

  2. #2
    New Member
    Join Date
    Jun 1999
    Location
    Gothenburg, SWEDEN
    Posts
    2

    Post

    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).]

  3. #3
    New Member
    Join Date
    Jun 1999
    Location
    Gothenburg, SWEDEN
    Posts
    2

    Post

    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

  4. #4
    Guest

    Post

    Thank you very much!

    Etoscha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width