Refreshing Recordset In Data Environment - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Refreshing Recordset In Data Environment

How do I refresh a recordset using the data environment in VB6? I tried using dataenvironment.rscommand.requery but nothing happens. It actually disables record navigation using code (dataenvironment.rscommand.MoveNext for example).

I also tried using dataenvironment.rscommand.resync but it didn't work either

Please help me achieve this

Comments

  • JonnyP007JonnyP007 Posts: 12Member
    : How do I refresh a recordset using the data environment in VB6? I tried using dataenvironment.rscommand.requery but nothing happens. It actually disables record navigation using code (dataenvironment.rscommand.MoveNext for example).
    :
    : I also tried using dataenvironment.rscommand.resync but it didn't work either
    :
    : Please help me achieve this
    :
    :
    did you ever find a solution to this as i am facing the same problem

  • tarisaitarisai Posts: 3Member
    : : How do I refresh a recordset using the data environment in VB6? I tried using dataenvironment.rscommand.requery but nothing happens. It actually disables record navigation using code (dataenvironment.rscommand.MoveNext for example).
    : :
    : : I also tried using dataenvironment.rscommand.resync but it didn't work either
    : :
    : : Please help me achieve this
    : :
    : :
    : did you ever find a solution to this as i am facing the same problem
    :
    :
    I haven't. I'm still trying out a few tricks but they won't work. Perssimistic record locking is not being accepted also. Any ideas?
  • JonnyP007JonnyP007 Posts: 12Member
    : : : How do I refresh a recordset using the data environment in VB6? I tried using dataenvironment.rscommand.requery but nothing happens. It actually disables record navigation using code (dataenvironment.rscommand.MoveNext for example).
    : : :
    : : : I also tried using dataenvironment.rscommand.resync but it didn't work either
    : : :
    : : : Please help me achieve this
    : : :
    : : :
    : : did you ever find a solution to this as i am facing the same problem
    : :
    : :
    : I haven't. I'm still trying out a few tricks but they won't work. Perssimistic record locking is not being accepted also. Any ideas?
    :
    None yet. i will let you know if i find out how. have you found a way of passing variables into a SQL query eg.

    dataenvironment.formulation.SQLquery

    The query looked like this

    Select * from Formulations where (Formulation = @text)
    with @text being the variable. do you know how to pass the parameter dynamically ?
  • tarisaitarisai Posts: 3Member
    : : : : How do I refresh a recordset using the data environment in VB6? I tried using dataenvironment.rscommand.requery but nothing happens. It actually disables record navigation using code (dataenvironment.rscommand.MoveNext for example).
    : : : :
    : : : : I also tried using dataenvironment.rscommand.resync but it didn't work either
    : : : :
    : : : : Please help me achieve this
    : : : :
    : : : :
    : : : did you ever find a solution to this as i am facing the same problem
    : : :
    : : :
    : : I haven't. I'm still trying out a few tricks but they won't work. Perssimistic record locking is not being accepted also. Any ideas?
    : :
    : None yet. i will let you know if i find out how. have you found a way of passing variables into a SQL query eg.
    :
    : dataenvironment.formulation.SQLquery
    :
    : The query looked like this
    :
    : Select * from Formulations where (Formulation = @text)
    : with @text being the variable. do you know how to pass the parameter dynamically ?
    :
    This is how I do it (hope it will work for you):
    Query = "Select * From Formulations where Formulation = " & Text1 & " Order By YourOrderField"

    Text1 is your variable (which I assume is dynamic) and YourOrderField is the field you use to sort your recordset. Haven't used used it with the Data Environment but I assume you may use it as:

    dataenvironment.formulation.SQLquery = Query

    after building the query in the string variable called Query
  • JonnyP007JonnyP007 Posts: 12Member
    : : : : : How do I refresh a recordset using the data environment in VB6? I tried using dataenvironment.rscommand.requery but nothing happens. It actually disables record navigation using code (dataenvironment.rscommand.MoveNext for example).
    : : : : :
    : : : : : I also tried using dataenvironment.rscommand.resync but it didn't work either
    : : : : :
    : : : : : Please help me achieve this
    : : : : :
    : : : : :
    : : : : did you ever find a solution to this as i am facing the same problem
    : : : :
    : : : :
    : : : I haven't. I'm still trying out a few tricks but they won't work. Perssimistic record locking is not being accepted also. Any ideas?
    : : :
    : : None yet. i will let you know if i find out how. have you found a way of passing variables into a SQL query eg.
    : :
    : : dataenvironment.formulation.SQLquery
    : :
    : : The query looked like this
    : :
    : : Select * from Formulations where (Formulation = @text)
    : : with @text being the variable. do you know how to pass the parameter dynamically ?
    : :
    : This is how I do it (hope it will work for you):
    : Query = "Select * From Formulations where Formulation = " & Text1 & " Order By YourOrderField"
    :
    : Text1 is your variable (which I assume is dynamic) and YourOrderField is the field you use to sort your recordset. Haven't used used it with the Data Environment but I assume you may use it as:
    :
    : dataenvironment.formulation.SQLquery = Query
    :
    : after building the query in the string variable called Query
    :
    mmmmm i am having problems acheiving this.

    i tried :

    dataenvironment1.rsFormulation = Query
    after building up the string but it says "Invalid Use Of Property"

    i cannot directly access

    dataenvironment1.Formulation.SQLQuery = Query
    it reports "Data Member Not Found" with it missing 'Formulation'

    My DataEnvironment Looks Like This

    DataEnvironment1
    - Formulation(Connection)
    + SQLQuery(SQL)

    Any Suggestions ???

    Thanks In Advance
    Jonny


Sign In or Register to comment.