Parameters in DataEnvironment

Visual Basic


  • 1. Memory Leak - Jet4.0v4.0.8015.0, XP, ADO2.7, DAO3.6
    I posted a response elsewhere, but I see that as you have multi-posted, I should not have bothered. (david) "paulg" < XXXX@XXXXX.COM > wrote in message news: XXXX@XXXXX.COM ... > I've put together a small VB6/SP5 app that will loop with each loop opening a database, then a recordset, closing the recordset then the database and repeat. I'll loop thru this a few hundred times watching the available physical memory drop with Windows Task Manager. A large portion of the available physical memory never gets returned, even after exiting the app. Even after waiting an hour for connections to be released, the memory hasn't been returned. This happens when using either DAO or ADO for database access. > > Anyone seen this or similar? Thanks in advance.
  • 2. RecordCount
    Hi I have a VB App that connects to a Jet DB. I have a recordset and I am trying to return the number of records. The RecordCount property returns -1. Am I doing something wrong: Set rsLoc = New ADODB.Recordset With rsLoc .CursorType = adOpenDynamic .ActiveConnection = gcnnLocDB 'gcnnLocDB is a valid connection to the MDB .LockType = adLockOptimistic .Open "tblLnkAS400Files", Options:=adCmdTable If Not .EOF Then .MoveLast glnFiles = .RecordCount If glnFiles > 0 Then ReDim gvarDLs(1, glnFiles) .MoveFirst For lnRec = 1 To glnFiles gvarDLs(0, lnRec - 1) = !FileName gvarDLs(1, lnRec - 1) = !FileSQL Next End If End If Thanks, Doug
  • 3. ADO Lock Type in Multiuser
    Hi All, Can any body help me to use the ADO Recordset in Multiuser Environment? How Can I Restrict User 2 to Open the Same Row which is Opened By User 1 and I will Display Message that "This Record is being opened for edit"? Suppose User 1 Open a ROW using SQL "Select * from EMP Where EMPID = 1001". So Now User 2 Should not be able to use the 1001 Employee. If He Try to open that then he should get the Above message. But he should be able to open any other records. And Also When the User 1 will Say "Update" or "Cancel" then the user 2 should be able to open 1001. I am New to Multiuser programming in ADO. Please Guide me. Thanks Prabhat

Parameters in DataEnvironment

Postby R2Vy » Tue, 11 Dec 2007 05:41:00 GMT

I am using VB6 with SQL2000 under SBS2003.

Why is tab2 (Parameters) within the DataEnvironment disabled ?
I want to add a new command, which is a SQL-statement with a
parameter (which is a public variable from the Form), like this: 
SELECT * from Table WHERE ID = m_XYZ
So the value of m_XYZ should be passed to the DataEnvironment(SQL)command.
I think, I have to set this parameter (m_XYZ) in the DataEnvironment, by 
using this tab2 (Parameters), but I cannot access the fields (adding the 
parameter m_XYZ for instance) of this tab.
I have tried the following statements, but nothing seems to work:
SELECT * from Table WHERE (ID = [m_XYZ])
SELECT * from Table WHERE ID = [m_XYZ]

In my opinion I need to use a certain syntaxis in above statement, on which 
DataEnvironment "regcognizes" this variable and put it in the 

Or am I totally wrong ? Any help is appreciated,

regards, Ger.

Similar Threads:

1.Passing parameter to DataEnvironment


Is it possible to pass parameter to a dataenvironment?

I want it to execute a SQL query, but the query is builded using the SQL 
builder in the dataenvironment.  I want that rsMyRecordset being made on 
different table that I specify.


Something like a "SELECT * FROM " & strMyTable executed in the 

Can this be done?

Thanks you very much


Return to Visual Basic


Who is online

Users browsing this forum: No registered users and 48 guest