adodb

  1. B

    VBA ADODB Record Count

    Hi, For some reason the record count for one of my sql-queries return -1. I have the exact same connection and query above, which returns the correct number of records. sqlRS.RecordCount returns the correct number of records, while sqlrs_c.RecordCount returns -1 (but ir really returns 5 to the...
  2. J

    Microsoft.ACE.OLEDB.12.0 Not working

    Hi, I am trying to query some data in an excel sheet using the Micosoft.ACE.OLEDB.12.0 it works fine when there are less than 65536 rows of data, however, when there is more than this it bugs out saying that it cant find the object. Any ideas how to get this to work for large data sets. I am...
  3. H

    ADODB connection and SELECT records from a store worksheet range syntax question

    I am trying to ADODB to obtain a recordset whereby I select records with the following select statement: .Open "SELECT STORE , CASESSTANDARD , CASES9LTR , PCODE , SALE, SDATE FROM " & TableName & " WHERE [STORE] = " & CStr(wsi.Cells(3, 6).Text) & " AND [PCODE] = '" & wsi.Range("A:A").Value &...
  4. S

    Database handling across procedures

    I have some modules which contains some procedures which uses a database connection through ADODB. What is the best way to control all these procedures database connections? Can I somehow only write the username, password and such one time and then reuse this in the other modules?
  5. S

    Output from stored procedures

    I am trying to use some stored procedures in Oracle. I've tried to use the upload-function with objConnection.Execute "BEGIN upload_from_excel(1, 2, 3 ,4); END;", but I don't know how to get any response if the query didn't run successfully. Is there a way to do this in VBA? I've found that I...
  6. S

    Check if ADODB reference is added

    Hi, When I use the ADODB library I know it's required that I've added Microsoft ActiveX Data Objects 2.8 Library before I can use my code. If it's now added my code will return an error. Is it possible through VBA to check if the reference is loaded before my line Dim Connection As...
  7. S

    ListObjects.Add ADO

    I've tried to import data with following code With ActiveSheet.ListObjects.Add(SourceType:=0, Source:=Array("DSN=db_name; UID=user_name; PWD=pw;"), Destination:=Range("$A$1")).QueryTable .CommandType = xlCmdSql .CommandText = Array("SELECT * FROM table") End With...
  8. S

    Merge queries for different databases

    I am retrieving data from 2 different databases with two different ADODB.Connection objects. Is there a smart way to connect to two different databases? I want to merge two queries from those two databases and print the data with just one CopyFromRecordset. Is it possible? I am using Excel...
  9. C

    ADODB connection problem because too many rows in source file?

    Hi, I am using an excel vba macro to get data from others excel files through an adodb connection. There are different source files containing extacly the same kind of data (same column type, same number of column etc), just the number of rows in each file is different. The vba macro works...
  10. M

    ADODB Local Server Connection

    Hey Everyone, In my workbook I am trying to connect to a local server using an ADODB conneciton referening the activex data objects 2.8 lib. I am using code that I copied from an old project of mine that works just fine, however it is not working when I modify it to use (local) as the server...
  11. A

    ADODB Import fixedwidth - no value given for required parameters

    Hi, First of all let me preface this with: I've tried hard to find the answer to this myself, so I'm sorry if this already exists on the forum. I'm trying to do a mass import into access using the OLEDB driver and "fixed width" if you notice in the below code, the commented out part is what I...
  12. ClimoC

    Save xls sheet or RS to mdb?

    Hello, diving into cross access/excel stuff here. Well, not really, but I'm using disconnected ADO Record Sets to index my massive worksheet tables (30,000+ rows). The whole thing runs beautifully. However I now want to be able to merge/pull/export/import different 'Data' sheets around, so for...
  13. ClimoC

    Userform Combobox - Link to Index of Unbound Column?

    Ello I have a disconnected ADODB, which userforms access. To search for items to perform actions on, there are 2 comboboxes. The first is my custom 'UniqueID' string ("AAAAA, AAAAB, etc"). The second is has two columns, the first is the Unique ID again, the second (which is ALSO THE BOUND...
  14. J

    Formatting from CopyFromRecordset

    I have a strange problem. I am using CopyFromRecordset to paste some data from a database, then formatting the data. The first column includes a date, so it comes in as a Julian value, then I format it to mm/dd/yyyy. This is on Sheet1. Then, I use CopyFromRecordset for another select...
  15. W

    Querying an Access database using the values in a range in excel.

    Querying an Access database using the values in a range in excel. See i have some values in say column A of sheet1. I have to use these values to Query an Access database. I am trying to connect to the database using ADODB. Another thing is that, I tried to use the SQL IN command to query...
  16. G

    EXCEL VBA ADO Recordset Problem

    I have a table of ref data which I connect to using ADODB (Code is below) Where .Fields(9) is Text it is returned, but when it's numeric it is not. I've tried removing null and making them all numeric but still have had no joy. I'm sure this is something to do with Types, but for the life of me...
  17. S

    Coding for diff versions of "Microsoft ActiveX Data Objects" Library

    I'm still having issues with an Excel spreadsheet with macro's... to make it multi-compatible for Office & Windows versions. In particular for ADODB in 'Microsoft Active X Data Object #.# Library' (C:\Program Files\Common Files\System\ado\msado*.dll) & mscomct2.ocx. I developed it in 2010 & am...
  18. D

    Using ADODB to connect to a SQL database

    Hi folks, Do any of you know of a good tutorial for making use of ADO to connect to a SQL database? My search of these forums didn't return any results... which is unusual! :) Thanks, Dan

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