ado recordset

  1. O

    a file opening problem pulling the data from closed Excel with ADO method

    Hello all, I am pulling the data from closed excel file to my current excel with ADO connection string for excels and I use the following statement to open that query. Everything is working perfectly until someone opens the sourced excel file at the background during that pulling process. If...
  2. H

    ADODB fetch all records into client machine virtual memory

    I am using ADODB C++ for Execute Query like Select * from table. This table having the large data around 4GB. So when i Execute Query then it is fetching all the records and increase heap memory and load all the records on the client machine virtaul memory. this is my code // **Create...
  3. Manuel Cavero

    Query to two Access databases

    Hi everyone I'm working in a code that need retrieves data from two Access databases, but unfortunately it doesn't works What the matter? Dim cn as adodb.connection Dim Qr as string Dim rs as adodb.recordset 'Opens the conection set cn = new adodb.connection with cn...
  4. vds1

    SQL query works in MS Access but doesnt when called from excel VBA

    Hi Gurus - Thank you for looking into my problem. Below query works when i execute in MS Access. Its a standard query which i plan to call in Excel using ADO. select * from qryForwardRecon; When the above query is called using ADO in Excel VBA , i get zero records. Not sure what could be...
  5. S

    Trying to get the Identity right after .Update using SQLOLEDB

    I'm just wondering if anyone knows why I have to execute the query twice in the code below to get the Identity? Example: Set rs = Cn.Execute("SELECT @@Identity as NewID", , adCmdText) x = rs.Fields("NewID").Value '''returns null Set rs = Cn.Execute("SELECT @@Identity as...
  6. M

    Read text file using ADO and populate a... Listbox in this example

    The below sub i created to populate a listbox using ADO to read a text file as Access and SQL were unavailable. I needed 2 columns from the txt file and one would differ per user so i used the persons computer username as the column name i would need (so it would work for anybody in the table)...
  7. bfreescott

    ADO queries are throwing errors that files are already open.

    I have an ADO query that pulls data from other excel files (without opening them - thus, the reason for choosing ADO to begin with), but the queries are erroring out when the file being queried is already opened by another user. Have you seen this or been able to resolve it?
  8. M

    ADO SQL and Recordset HELP!!

    Hello All, I am having the most wretched time trying to figure this out. I have a worksheet with merged cells (I cant change the input format, I know, I know merged cells are evil and very true for me right now). But anyway in order to get the data I need I have to run 2 queries which works...
  9. D

    Excel/ADO: Sometimes no records found

    I can usually run the following code without issue, but it sometimes fails to find any records in the record set. The file itself is large - over 200k rows. In addition, it has some merged cells, and the column widths are not wide enough to view the data without auto-fitting (I am not sure...
  10. G

    ADO connection, Execute method, and Excel VBA...

    Dear friends, I'm creating an Excel Add-in that has several functions. Also I have a bid data in Access (more than 10 000 rows, and several tables). The Add-in connects to DB when it opens. Then every function in the Add-in use RecordSets to read data from Access DB and do some calculations...
  11. S

    Need to paste result output of two queries with both headers in same page!!

    Hello All I need to paste the output of two queries in same worksheet. When my code is executed it pastes the header and values of first query. But for the second query i get only values and not header.. Please help me.. Below is my code.. Private Sub CommandButton1_Click() Label5 = " "...
  12. B

    All about those recordset objects

    I'm trying to do the following Send a query to a SQL Server DB Receive a dataset (in the form of a recordset object) Store all of the rows of a specific column of the recordset data into a dynamic array (which would require something like redim array(1 to recordset.recordcount). I can use the...
  13. M

    Using ADO to Save, Recall and Update records in Access using Excel 2003

    I'm not too familiar with Access and linking to it from Excel so thought that on a recent project I would try and build up my skill set and use ADO, plus the use of a database in this instance was appropriate. So far, I have figured out how to Recall a record that matches a certain condition...
  14. M

    ADODB SQL Statement ORDER BY Statement

    Hi, I have been reading a lot about ADODB but I couldn't figure my problem. I hope someone here can help. I have an Excel Sheet which I use as Database. The database has 11 columns and I insert data with the following function: Sub testInsert() Dim adoCommand As New ADODB.Command Dim...
  15. P

    cannot do rs.AddNew after setting rs=cn.Execute(strsql)

    I have opened my recordset rs with adLockOptimistic which set LockType to 3. However after I Set rs = cn.Execute(strSQL) which executes my SQL string, the LockType got reset to 1, which is read-only and I cannot do an rs.AddNew to the recordset. Code: <tbody> Set rs =...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top