Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Visual Basic

See Related Forum Messages: Follow the Links Below to View Complete Thread

Hot Refresh The Recordset From Dataenvironment

I am working on a vb6 application. I have a datagrid and use a recordset from dataenvironment as the datasource of the datagrid. The data shown on the datagrid should be refreshed every 3 minutes. How can I refresh the datasource?
Please help me.



Dataenvironment Refresh?
I find that my datareports don't ever reflect changes I make to the database, unless I quit my program and re-run it. Is there a way to refresh the dataenvironment?


How To Refresh Dataenvironment?
How to refresh Dataenvironment?

For example : I want one command of Dataenvironment1 to retrieve latest data from database every time I use ""

Thank you in advance!

DataEnvironment Connection Refresh
I have 2 database connection in my VB application.

A standard ADODB.connection and a DataEnvironment connection

Modification (insert) made with the ADODB one seems not visible to the DataEnvironment one.

You think I need some refresh?


To Refresh The Connections Of Dataenvironment...
Hi All,

I am facing a problem to refresh connections in dataenvironment.
Say I have two tables tb1 and tb2.I saved the records in tb1. Now to run report I developed a small screen with "update" and "show"buttons.I select one unique number say empcode "1" and click on "update" button.Data of selected empcode
transfers from tb1 to tb2.Then I click "Show" button and run the report.The details of that empcode "1" shows in report.Now I close the report and select another empcode "2" and click "update" button.Msgbox"Record Updated." comes.
But when I click the "Show" button" then report shows empcode "1" data not empcode"2" data.When I close the application and start again and click "show" the report shows the data of empcode "2".I think dataenvironment connections are not refreshing.
Please advice how to solve this problem with code.
Waiting for valuable reply.

Problem To Refresh My Dataenvironment...
Hi !!

Here's the problem :

I have a project with a Datareport linked to a Dataenvironment linked to an Access Db... in order to get reports...
I've got the possibility to update my Db from a textfile in my project... and it works also...

And all works often normally... except after updating my Db !
The Datareport become white... nothing appears anymore...
I think I must Refresh the Dataenvironment... but I can't find the propertie !...
If someone can Help...

Really thank you...


Refresh Datareport Using Dataenvironment
I am using datareports in VB 6 & the datasource is through dataenvironment.

Using command button in a form the user retrieves data through datareport.
My problem is I need to refresh the datareport without closing the application.

For eg: the command button retrieve has the foll code
dim ssql as string
ssql = "select a,b,c,d,e,f from xyz where a = '" & txtpqr.txt & "'
de1.commands(4).commandtext = ssql

Can anyone tell me how do i refresh the datareport everytime the use clicks the command button.

DataCombo & DataEnvironment Refresh
Hi everyone

I´m in trouble with DataCombo an DE.

I have a DataCombo with a RowSource established to a DataEnvironment Command Recordset (cmcountry-->rscmcountry)
I try to change this Command recordset as follows

rscmcountry.Source= <...FILTERED SQL STATEMENT...>
DataCOmbo3.Refresh (I also tried DataCombo3.REfill)

I can see in the Debugger that rscmcountry has the correct values, but the combo doesn´t refresh
at all... the combo´s visible items after refilling is 0!

I tried to bound the Combo directly to the Command
(RowSource=cmCountry), but when i change the command Source to fiulter the register, the
rscmcountry sourvce didn´t change with its command source, and the contents of the combo are
the same as the original command´s source

At last, i´ve tried to declare an ADODB.REcordset,
execute the command

Set rsCountries= cmCountry.Execute
But when i bound rsCountries to my combo, it´s not

The only way i get the correct results is using
an ADODC, but i think thatevery ADODC consums a
different connection, and when i have more combos,
I will be spending many resources.

Can you help me? Please answer if you know the answer or can send me a related code.

How To Refresh Dataenvironment Aggretate Totals After New Entry
I have a datagrid of items and an aggregate and a text box with its datamember set to the aggregate grand total.
How do I get the aggregate total to change when I change one item in the grid? I tried all the updates, refreshes and requeries I can find but the only way I can see the new total is to close and reopen the application.
If I create a sum recordset and makle the total text box unbound it shown the new total so the database is being updated OK

Datareport Without Using Dataenvironment Recordset?
I wonder if it is possible to create a dataenvironment datareport from a recordset that is not created by the dataenvironment?
And if so, how do i do that?
Thanks in advance,

Querying A DataEnvironment RecordSet

I want to query a dataenvironment which connects to an Access database. The table is named:


I want to find a specific Patient name on the table and navigate to that entry and display all the fields on the screen. Like in a Simple Data Control you could write:

rsPatient.RecordSource = "SELECT * FROM Patient WHERE" & strName & "= '" txtName & "'".

Now, how do I implement this using a DataEnvironment?

I would like to know what you think...

DataEnvironment Vs RecordSet Methodolgy?
'Lo all...

I'm trying to use the Data Report function...

I've got it up and running fine, by following the default methodology as per the examples in the MSDN lib...

But I've a question. I want to "modify" the results shown, by asking the user to pick two dates (a range if you will) to use to cherrypick thru the dbase. That is a start date and an end date to qualify the query.

To do that, I'm using a couple of DTPickers..and can so far get the dates into a textbox fine.

But my question is this. If I use the dataEnvironment method to connect the report vars with the dbase, can I modify the query by using these DTPicker items? If so, how do I 'pass' those two dates to the report?

And, also, is the dataEnvironment the way to go? If this app is distributed to friends, will it run 'okay' -- I've only experience using a recordset methodology...and not this dataEnvironment one...anyone know?


Datareport From Recordset Without Dataenvironment
I thought it was possible to create a data report from recordsets and went along and tried this:

 'generate ADO recordset
 Dim rsreport As ADODB.Recordset
 Set rsreport = New ADODB.Recordset
With rsreport
.ActiveConnection = cnWorkOrderDB
.CursorLocation = adUseClient
.CursorType = adOpenDynamic
.Open "SELECT * FROM dsnWorkOrder "
End With

'rsreport.ActiveConnection = Nothing

Set datareport1.DataSource = rsreport

Do While rsreport.EOF = False

With datareport1.Sections("section1")
With datareport1.Sections("section1")

.Controls("txtReportSampleID").DataField = rsreport!SampleID

End With


i get an error at the point i do a .show: "Operation is not allowed when object is closed"

my question is why does the compiler think the datareport object is closed when i didn't explicitly close it? or have i overlooked something else?


DataEnvironment Recordset Speed
I m using dataenvironment in my application and a customers form.
There is a recordset for customers table in the dataenvironment and binding that to the customer fields on the form.

I have got about 20,000 records in the customers table and when i try to open the customers form it takes a long time.

The reason i know is due to the property called all records on the recordset property page under the advance tab and if i uncheck this then it open the form fast but it does not show the values for the records.

Using oracle at the back end.

How i can solve this problem? Espacially the speed.

Thanks in advance

The New Field Isn't Include In The DataEnvironment Recordset (Access Db)
Hi everyone , I really need your help right now ...

I had a routine that was working very well until now . Seems like my recordset isn't updated , and does not include the record I've created . When I try to access the field , it doesn't exist in the record (But was working last week with the SAME code and the field is in fact there in the DB) . My idea is that the Recordset need to be updated but maybe it's something else . Any help would be appreciated . Here's my code :

First I'm using DataEnvironment to access my Access DB and the command is configure to "optimistic" and include simply a complete table (All fields is "on") . I open it at the beginning of my program that way :

Then , in my program , when the user clicks a command button to create a new entry , a new field is created in the table (the one linked with my previous recordset) . I create it that way using DAO commands :
Code:Dim db As DAO.Database
Dim tbl As DAO.TableDef
Dim fld As DAO.Field
Dim prp As DAO.Property

Set db = DAO.OpenDatabase(gConnexion) 'Open the database with "gConnexion" that contains the path
Set tbl = db.TableDefs("tblWanted") 'Open the "Wanted Table"
Set fld = tbl.CreateField(fldWanted, dbBoolean) 'Create the new boolean fields in the table
tbl.Fields.Append fld 'Update table
Set fld = db.TableDefs("tblWanted").Fields(fldWanted) 'Reassign
Set prp = fld.CreateProperty("DisplayControl", dbInteger, 106) 'Change property to display "Checkbox"
fld.Properties.Append prp 'Update field
Set prp = fld.CreateProperty("Format", dbText, "true/false") 'Change property to "True/False"
fld.Properties.Append prp 'Update field

Set fld = Nothing 'Clean up all
Set tbl = Nothing
Set db = Nothing

This works very well and the field is created as i want in the table . The problem is when I try to access the field using a reference to my DataEnmvironment recordset . Example :
Code:With DataEnvironment1.rscomWantedRecordset 'Work with the recordset
     .MoveFirst 'Move to first record
     Do While Not .eof 'Until "End of file"
          If .fields("fldWanted") = WantedValue then ' THATS WHERE IT BUGS
               'Code to execute
          End if
End with

It bugs there saying "Cannot find wanted field in this recordset" (something near that) but the field IS in Table and the name is ok . So I think my recordset isn't updated to include the field . I've tried many things to update that recordset but maybe I don't do it the right way ... (And this code was working VERY well last week , without any bug and I've not change anything in this code , I only do more database manipulation before accessing the field ) .

If anyone have a clue , I would be really HAPPY to know it ... Thanks

Expending VB collective ... resistance is futil .

Refresh Recordset
I'm probably not thinking this through.......but here's my question.

I have a form with an assortment of text boxes. I create an ADO recordset through code and bind the text boxes to the recordset with the datasource & datafield properties. What I need to do is refresh the form and recordset. In order to close and re-open the recordset, I assume I have to "unbind" the textboxes before I close the recordset...???
I can't open the recordset through executing a command because I need the ability to edit the recordset, so I think using a requery isn't a possibility.

Thanks for any advice or suggestions.

Refresh Tha Recordset
when i make changes in the recordset, the first time i check out the changes ,i cant see any changes,just in the second time i see the changes ,i think its the refresh, but i dont know how to use it.

Refresh A Recordset
i have a database that can be changed any time
i need user to see also updated version of the database
i use adDynamicOpen an Resync and work fine for updated records
but not with new added records so i used requery but it crashed with currently records under updates because it act as close then open. Is there is another method unlike requery ?

Thanks all

Refresh Recordset

I'd like to know the best (more efficient) way to refresh data in a recordset using ADO (SQL database)

What I'm doing know is running the create recordset procedure everytime I make a change in my data, but that's too expensive.

private sub create_object

Set ger = New Command
Set rsglobal = New Recordset

With ger
.ActiveConnection = vtacxc.ventas
.CommandText = "SELECT gerid as codigo, gerrnc as rnc, gerdesc as description, gersiglas as siglas, " _
& "gerpresidente as presidente, gertelefono as telefono, germeta as meta, " _
& "gerfax as fax, gercelular as celular from gerencia"

End With

With rsglobal
.ActiveConnection = vtacxc.ventas
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
End With

Set rsglobal = ger.Execute

Refresh Recordset
hi, good day! just want to ask how can i refresh the recordset after i added a record in it(i'm using DAO technology). The scenario is this: After i've added a record using AddNew method, i used sort property to sort the data & I've already used the refresh method but still the records is unsorted. Can anyone give me some piece of advice in this matter. Thanks in advance!

How Do I Refresh A Recordset
I' musing data environment designer

How do i refresh a command after modifiing some data in another window?

1-the user clicks on a mshflexgrid

2-a window appear with the data in textfield ad combo boxes

3-he adds, delete and modifie records

4-he closes that vbmodal form

5-the mshflexgrid reappear with data not refreshed


Recordset Refresh
hi to all of you.. badly need help...

how can you refresh the recordset after adding and editingrecord.

because when i add new record to the database, the record won't show up in the textboxes after adding it.. i need to rerun the program to be able to see the new record...

How To Refresh A Recordset
If a recordset of 5 records filters to 3 records, how can I regain the original 5 records ?

Refresh ADO Recordset
I'm struggling with how to refresh an ADO recordset withou exiting the application and restarting it.

Using DataEnvironment tool in Data Designer (VB6) to create a SQ search command and recordset. The recordset is modified by th application successfully. Old records are retained intentionall for historical reasons but I don't want the user to see the after they have been modified. Part of the SQL statement look at a bit record which tells whether the record is historical o active.

It seems that re-running the SQL statement or refreshing th existing recordset should be fairly easy but since I'm havin difficulties figuring out how.

I figure this problem has been solved hundreds of times befor but I can't find a post on it.


Bill Hersey

ADO Recordset Refresh>??????
Aceess 2000 ,Vb6(Sp5)
I am new in developing mutliuser DB application.I want to know that if 2 users are using similtanouesly vb application and if one of them is Just viewing and second one is editing and inserting new records,
how the recordset properties should be designed that the second user could see the new and updated Records

Currenlty ,i am firing the query for recordset at form load event but when second user insert the new record i have to unload and load the application

any help /comment in this regard will be greatly apprecitaed

Recordset Refresh
Hi Guys,
An interesting problem...I want to know if we could refresh only one record in a rcordset. Like I have a datagrid bound to a table. and when they click ont he lines I bring up an Edit form for that record. So, when they save that form, I need to refresh this datagrid again so it shows updated data. Both Resync and Refresh operations have proved costly. Is there any other refresh method that Iam not seeing? When it conatins like 2000 records in sql its too slow.

I want to nkow if I can update the data for that record only in datagrid or, that is the recordset underlying the datagrid?

Many thanks,

Refresh Recordset

i'm using a recordset (not adodb) and i use indexes. If i add a new record i get the following situation: I want to go to a specific record so i made a while loop til i have reached the record. When i let my code run normaly i get into an "eternal" loop. But when i put a break point before the loop everything works fine. here is my code:

Call addnewrecord ' the function that adds a new record
adoRS.Index = sCompany & "wordbe" & "statbe" & "itembe" 'if i put a breakpoint here everything works fine ">=", sPlCompany, TxtWorksOrder.Text, " ", ItemSt
While adoRS!BOXNBE <> sNewBoxNr
.MoveNext'if i don't have a breakpoint the loop continues

I hope i made my problem clear?

Recordset Refresh Delay
the problem is when i delete a record this is directly visible but when i add a new record not. i use the same procedure to refresh the table where the records are visible. how is this possible?
and how to resolve this problem?

methods i tryed

between every line a doevents
a timer and wait 1 second and do the refresh
still no results

thx in advance
greetings triple

ADO Recordset Refresh Problems

I have a form where I put 2 textboxes and a mshflexgrid.
I've made my connection to the database with the database environment of Vb,
but I didn't bind the fields of my database with the textboxes. I do this
The problem I have is, when I add a record to the database, it should
immediatly been shown in the flexgrid also AND IT DOESN'T !!!
When I close the form and reopen it then I see the new record in the
The code for adding a record I use is shown here below.

Code:Private Sub cmdToevoegen_Click()
    With deZonnekloppers.rscmdGemeenten
        'Set add mode

        'Add fields
        !Gemeente = txtGemeente.Text
        !Postcode = txtPostcode.Text

        'Do Update
    End With

    mshflexGemeenten.Refresh '(THIS IS THE MSHFLEXGRID)
End Sub

I think the problem is that I didn't refresh my recordset after the update,
but how do I do that ????
Please help,


Recordset Refresh Problem
i have two subroutines that populate a combo box and a list box and they work fine but when i run another routine froma command button to insert intoa table and run the routines again they do not update.
but, and this is where it gets a little weird. when the add button is pressed again it updates the boxes from the last button press. i know that the table is being updated properly.

i have a work around, if you wanna call it back and this may help. if i display two message boxes after the add button is pressed the boxes update properly.
can anyone explain this connection??
so weird.

i'll paste the code here:
thanks for any info on this

Option Explicit

' this is the add button
Private Sub cmdaddcat_Click()
Dim itemID As String
Dim sConnect As String
Dim strcatID As String
Dim sSQL As String

itemID = frmmain.MSFlexGrid1.Text
sConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "inventory.mdb;Persist Security Info=False"

Dim objAccessConnection As ADODB.Connection
Set objAccessConnection = New ADODB.Connection

'objAccessConnection.CursorLocation = adUseClient
objAccessConnection.Open sConnect


Dim catRS As ADODB.Recordset
Set catRS = New ADODB.Recordset
catRS.Open sSQL, objAccessConnection
strcatID = catRS("CATEGORYID")
Set catRS = Nothing

Dim objcommand As New ADODB.Command

objcommand.CommandText = "INSERT INTO CATEGORY_ITEM (CATEGORYID, ITEMID) VALUES ('" & strcatID & "','" & itemID & "')"
objcommand.ActiveConnection = objAccessConnection

fill_listbox sConnect, itemID
fill_combo sConnect, itemID

End Sub

Private Sub cmdclose_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim itemID As String
Dim sConnect As String

itemID = frmmain.MSFlexGrid1.Text
sConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "inventory.mdb;Persist Security Info=False"

fill_listbox sConnect, itemID
fill_combo sConnect, itemID
End Sub

Private Sub fill_combo(sConnect As String, strItemID As String)
Dim sSQL As String

Dim objAccessConnection As ADODB.Connection
Set objAccessConnection = New ADODB.Connection

'objAccessConnection.CursorLocation = adUseClient
objAccessConnection.Open sConnect


Dim catitemRS As ADODB.Recordset
Set catitemRS = New ADODB.Recordset
catitemRS.Open sSQL, objAccessConnection


Dim catsRS As ADODB.Recordset
Set catsRS = New ADODB.Recordset
catsRS.Open sSQL, objAccessConnection

If Not catitemRS.EOF Then
While Not catsRS.EOF
While Not (catitemRS.EOF Or catsRS.EOF)
If catitemRS("CATEGORY_NAME") = catsRS("CATEGORY_NAME") Then
End If
If Not catsRS.EOF Then
cmbcat.AddItem catsRS("CATEGORY_NAME")
cmbcat.Text = catsRS("CATEGORY_NAME")
End If
While Not catsRS.EOF
cmbcat.AddItem catsRS("CATEGORY_NAME")
cmbcat.Text = catsRS("CATEGORY_NAME")
End If

Set catsRS = Nothing
Set catitemRS = Nothing
End Sub

Private Sub fill_listbox(sConnect As String, strItemID As String)
Dim sSQL As String

Dim objAccessConnection As ADODB.Connection
Dim catitemRS As ADODB.Recordset

Set objAccessConnection = New ADODB.Connection
'objAccessConnection.CursorLocation = adUseClient

objAccessConnection.Open sConnect


frmitem.AutoRedraw = True

Set catitemRS = New ADODB.Recordset
catitemRS.Open sSQL, objAccessConnection

Dim strmsg As String

MsgBox ""

While Not catitemRS.EOF
lstcat.AddItem catitemRS("CATEGORY_NAME")
strmsg = strmsg & catitemRS("CATEGORY_NAME") & " "

MsgBox ""

Set catitemRS = Nothing
End Sub

Recordset Refresh Rate

I'm using a frmMain for opening several recordsets and displaying their data in two datagrids and some textboxes, which are grouped by a frame-array (I'm using tabstrip).

I use a modal form (dialog) for adding / changing the data. The problem is that when I close the dialog, the data on the main form isn't refreshed. Not even after closing the recordsets and re-opening them. I have to click the tab-strips(switch) several times, before the data actually refreshes.

This is how I tried handling thins:
When opening the dialog form, all recordsets are closed. New recordsets are opened and data is added/changed. When closing the dialog, the recordsets are closed again and the main-form opens the recordsets and fills the textboxes (and other controls) with the data.
When clicking another tab, again all recordsets will be closed and re-opened.
Somehow just opening, closing and re-opening the recordsets just doesn't work for me.

Please help me.


Ado.recordset.update/refresh Problem
Hi all,
I'm trying to find a way to redisplay the record that was being editted after updating the db, versus going back to the first record. I don't have the code with me, but basically I do something like this:
get editted info

Am I missing an easy way to not have it refresh to the beginning?


Unbinding?? Textbox....refresh Recordset
I'm probably not thinking this through.......but here's my question.

I have a form with an assortment of text boxes. I create an ADO recordset through code and bind the text boxes to the recordset with the datasource & datafield properties. What I need to do is refresh the form and recordset. In order to close and re-open the recordset, I assume I have to "unbind" the textboxes before I close the recordset...???
I can't open the recordset through executing a command because I need the ability to edit the recordset, so I think using a requery isn't a possibility.

Thanks for any advice or suggestions.

Refresh Recordset And Gain An ISAM Error

    I have built an application that automates various aspects of building computers for us, during this automation it connects to a Microsoft Access 2003 database, on my computer it works fine, however i have run it on a client for which it is intended and.
when the recordset.refresh occurs i get an error "Couldnt Find Installable ISAM" after looking at various solutions to this, i downgraded the database to Access 97, as the problem apparently only occurs with Access 2000 + This isnt true, im still getting the error.

I have the latest MDAC installed, however the computer that is running this app, doesnt have Access Installed. Can anyone help with this...?

This is the code im using, however im confident its not a coding problem, i think its more to do with some files i need on the client..... thanks

Function IsCompInDB() As Boolean

    sComputerName = (Environ("ComputerName"))
    Set ObjContainer = GetObject("winmgmts:\" & sComputerName & "
    Set ObjNetCards = ObjContainer.ExecQuery("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
    For Each ObjNetCard In ObjNetCards
        sMacAddress = ObjNetCard.MACAddress

    With frmMain.dtaGMTMacList

        .RecordSource = "select * from MACList Where MacAddress = '" & sMacAddress & "'"

        Do While Not .Recordset.EOF
            aDBInfo(iCount, 0) = .Recordset.Fields(0).Value
            aDBInfo(iCount, 1) = .Recordset.Fields(1).Value
            aDBInfo(iCount, 2) = .Recordset.Fields(2).Value
            aDBInfo(iCount, 3) = .Recordset.Fields(3).Value
        iCount = iCount + 1

        iCount = 0
        If .Recordset.RecordCount = 0 Then
        IsCompInDB = False
        IsCompInDB = True
        End If
    End With

End Function

Many Thanks

Paul Farrington

How Do I Refresh The Contents Of An Adodc 'recordset' During Runtime?

I have an Adodc object which reads data from an Access database to an MSHFlexGrid just fine. I then add to that data during runtime using following:
Dim dbMyDB As Database
Set dbMyDB = OpenDatabase("MyDB.mdb")
Set rsmyrs = dbMyDB.OpenRecordset("MyTable", dbOpenDynaset)
etc etc....

This all works fine and data is added to the database but the information is not updated during runtime in my MSHFlexGrid. I must first close the application then open it again to view the new data.

Does anyone know how to refresh the MSHFlexGrid during runtime?

Thanks in advance...

Refresh Crystalreport Viewer When Data Recordset Change
I am using crystal report designer 7 in vb6
the report is attached to data fileds definition text and in runtime is attached to table in oracle as the following code

'in the event initialise of crystal report designer (crystalreport1 as icrdesigner

private Sub Report_Initialize()
Dim c as ADODB.Connection
Dim r as ADODB.Recordset
Dim s as string
set c = new ADODB.Connection
set r = new ADODB.Recordset
s = "Provider=MSDAORA.1;User ID=xxx;Data Source=base;"
c.Open s, "xxx", "yyy"
r.CursorType = adOpenStatic
r.LockType = adLockOptimistic
r.Open "table", c, , , adCmdUnspecified
me.Database.SetDataSource r
End Sub

and for display the report i used the smart viewer report
crviewer1 as crviewer
in the event load of (the form1 as form) wich contain crviewer1

Dim Report as new CrystalReport1
private Sub Form_Load()
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
Screen.MousePointer = vbDefault
End Sub

'for display the report viewer


the problem
when i call form1.visible the show of report
is correct
but when i insert or change commited data of the table datagrid.
the table modified is the table of the report.
And i like to show the report the new change data is not take.
can i help me to how to refresh the data in report .

Dataenvironment Recordset Gives Error "Library Not Registered"
Hi All

I have developed a sales/quote system using VB6 sp5 with a SQL 2k database. I connect to the database using ADO for the forms and the dataenvronment for the reports. This system is running on a mixture of Windows NT/2k/XP workstations, no problems so far. However, the copy installed on the server does not print, we are getting error number -2147220992, Library Not Registered.

It has been working with little problem, but a recent update to the front end seems to have messed things up. We have reinstalled the app but with no joy. I know some of you will ask why we are running this on the server, and the answer is that the big boss uses this occassionally as a PC. Scary but true. We are working on him to prevent this but that is an issue well outside the scope of this forum.

I have found information in the MS knowledge base that refers to Visual Interdev, but cannot find anything related to VB.

Any advice anyone.



Cannot Refresh Data Using Crystal Viewer Refresh Method
I am using crystal report 8.5 and Visual Basic 6.0

I get an error for this code.


error :

Method 'Refresh' of object 'IcrystalReportViewer' Failed

thank you ....

regards pragash...

MSFlexGrid Refresh Causes My Comboboxes To Refresh???
What in the heck is happening?? On a form I have 2 combo boxes, the first for suppliers and the second for contacts. The contacts is filled from the database after the supplier is chosen. On my Flexgrid, I have several pop-up forms/controls. When I open them (For instance the DateTimePicker) and select the date from my pop-up control, my screen flickers and my contact is blank again. The supplier stays like it was. I can't exactly paste the code for this, since I am at about 5,000 lines and counting on this Application.

Does anybody has an example/code of how to use a DataEnvironment. It's the first time I'm using it and I don't know what's going on; but I can't make it work.

I have a DataEnvironment, when I right click on the Connection and choose Properties:
In the Connection tab I have to select or enter a database, my database is .mdb:
D:My VB Projects15Data.mdb
However, this is a static path, when I install my application into the user's machine, this path will become invalid, of course!
The question is that how should I use something like:
App.Path & "Data.mdb" ?!

I have 1 connection to my DataEnvironment, and that connection has 3 commands. Each command populates a separate grid on my form. The problem is that when I execute more than 1 command, the previous grids are cleared. Basically, when another command is run, the previous DataEnvironment is cleared. Does anyone know how I can prevent this from happening?

I am also getting an error stating: Operation cannot be performed while DataEnvironment is open/closed.

DataEnvironment ???
Dear All,
I use a connection object in dataenvironment as my datareport datasource. After I changed the contents of the table the connection linked to, and then run again without stopping the previous task, I couldn't load the updated value to the datareport but only can use the old ones. Can anyone tell me how to solve this problem? Thank you very much.


About DataEnvironment
Hi all,
When I use the Connection in DataEnvironment to link to a database, I have to specify it's path. However, I 'd like to create a package and I can choose other path during installing. Can I do it and how to do it ? Can anyone help me ? Thank you .


I'm using a DataEnvironment,
my question refer to the command, and is sql statement.
Is it possble to pass a variable value to the sql statement of a command?

i mean i have a command that have an sql statement like:

"select * from tabella Where id = 123"

is it possible that instead of 123 i have a variable that i have in the code?
i want to change it with my code!


I have a Child Command under a Parent Command like below:-

For example:

- Student 'Command 1, Parent
- ID 'key
- Name
- Academic 'Command 2, Child
- ID 'key
- Course
- Grade

Alright, I have got everything working visually... but how can I access the child command in code??

Suppose I want to get the Course & Grade data by given the ID... how I do it in code?

I can only access the Student info in Command 1 but it seems there is no recordset defined for Acedemic in Command 2 as I can't find it in the intelisense menu...

Any idea??

BTW, do I need DataEnvironment in order to use DataReport? What aboud ADO Control with DataReport?


Dataenvironment And Sql
How can I change sql query if need to be chenged dynamically?

I m a novice user for VB. and using Aceess 2000 as backend.

Thanks if i can hv some tips or code...


May I know how do I close my DataEnvironment connection? Please advice...

Cannot See The Dataenvironment
I have written a program using Data environment and data reports. I have to modify the
program to fix some errors. But, now I cannot see the Data environment in the project and I also
get some error message as "Line 2: Class {C0E45035-5775-11D0-B388-00A0C9055D8E} of control
DataEnvironment1 was not a loaded control class." followed by the path of the dataenvironment. Has
anyone also have experienced similar problem? How can I get my Data Environment back?
Any help is greatly appreciated. Thanks in advance

Copyright © 2005-08, All rights reserved