adodb

  1. K

    ADODB Connection referring to Local path NOT Network

    Hello, I've been trying to fix this all day with no luck. The goal of this code is to use a function to look up a value in a table in an Access database (.accdb) and return a different value. I am running the code below, and the adoCN works just fine. It creates a locked .accdb file showing...
  2. L

    Excel VBA connection to MYSQL using Transactions

    I need to write to multiple tables in my MySql database from excel (possibly 20 plus). I will be needing to use PK of certain tables i update as FK of others. I would really like to use Transactions to insure all information is update and if something errors out for any reason then i can...
  3. J

    Difference between ACCDB vs ADODB database

    What is the difference between an ACCDB database and a ADODB database. I use Access 2016. My current database is ACCDB. How can I convert it t ADODB.
  4. M

    Delete Records in a Excel table using RecordSet ADO

    Hello everyone: I'm trying to delete all records in a RecordSet ADODB Object connected to a Excel Sheet, using two differents ways: Delete records using an ADODB Connection Object Delete records using an ADODB RecordSet Object Also, as far as I know MS recommend to use the 2nd So, what...
  5. R

    adodb query excel spreadsheet, query return sheet row?

    Experimenting with queries to my worksheet. So far, I can successfully get meaningful results back, but wonder how I can get those results to include the row they were found in?? My query Looks something like "SELECT [test1], [test2] FROM [Sheet1$]" Want query to get row some how in results...
  6. R

    adodb performance EXCEL VBA vs vbscript

    I have a rather large query, containing a table join that returns approximately 80k rows; executing this query via excel VBA seems to result in a minute or longer of processing. I don’t have the same speed issues when returning 5-10000 rows in excel; just the one that’s returning 80k rows. I...
  7. S

    Searching using ADODB

    I am trying to find data from access using the below code. The variable R is the date which it will search in the table. If date find in table, it will pickup data from some of the field else it will close the connection and loop will forward. Now the statement "On Error GoTo ST2" is working for...
  8. D

    Stuck on ADODB.connection MySQL

    Hi, I am completely stuck on this one, any help will be appreciated. I have a code which is supposed to do inserts/updates in database. I have connected to database using both (one commented out): Sub SQLConnection() Dim oConn As ADODB.Connection Set oConn = New ADODB.Connection...
  9. A

    Getting spreadsheet names from closed file using ADODB with excel tab order

    I am able to successfully connect and query specific sheets. Some files I am dealing with may have the first spreadsheet name different or changing and sometimes there may be more than one. i tried to write a few different functions to return a full list. However none give me the spreadsheet...
  10. J

    Excel to Access Dates

    Hello there, I'm having a problem with inputting dates via SQL commands to my access database as they are getting changed to peculiar values. Background: The tool is a counter for the amount of work a person has done, each time the button is clicked the updated values are sent over to the...
  11. A

    Excel VBA ADO Insanity

    Hi all, I need help troubleshooting this code. When I run it, it errors out at the .Update saying [Microsoft][ODBC Excel Driver] Syntax error (missing operator) in query expression '(1stMedication=Pa_RaM011 AND 2ndmedication IS NULL AND Qualifiers IS NULL AND Route=Pa_RaM012..." How do I fix...
  12. L

    Using external database for excel application.

    Hi all, I have developed a rather large application with VBA that we use at work. The problem with this is that the database is now in the excel application, and that means that no more than one person can use the application at a time. This is normally ok, but I thought I would try to fix this...
  13. P

    Date data from ADODB SQL returned to Excel as text, not date

    I have written a complicated SQL script which runs fine, except for some reason a date column is being returned to Excel as text, rather than as a date. The field is a date, and I've even tried CASTing the field to date in the SQL just in case, but still get the same problem when the recordset...
  14. L

    ADODB CopyFromRecordset returns everthing perfectly except for plain numerical values

    Good afternoon, First off, thank you all so much for all the help you have provided my lurking self throughout my history of learning excel and vba. On to the question: I am using the following code to compile a bunch of daily inventory sheets into one master sheet. It functions perfectly...
  15. B

    Using VBA to pass ADODB.Recordset to HTML javascript function

    I am trying to pass a recordset to an HTML javascript. The reason is that my company's web page sercurity policy does not allow me to create an "ActiveXObject" in javascript. I was experimenting with passing a recordset from VBA to HTML javascript function as a work around. I can't seem to...
  16. baitmaster

    syntax for SQL query from same workbook

    Good evening all I have an ADODB connection to a worksheet within the same spreadsheet - its a dataset that I wish to query using SQL in order to run reports. I'm doing fine except some gaps in my knowledge of syntax for this type of query Subs to open and close the connection: Sub...
  17. S

    Inserting values into SQL SERVER table via VBA.

    Suppose I have a table in Excel with two columns (Name, Rate) (say, this table's name tExcel). Table starts at cell (2,1), and Date is static (in cell (1,1)) I want to insert those values into SQL Server 2008 tRate table with following logic insert tRate(ID, Rate, Date) select s.ObjectID...
  18. S

    HOW TO - in excel VBA using SQL - Perform a Left Join from a local named table to a database ADODB table

    I regularly run queries inside excel VBA. What I do is I store the SQL code in a String variable 'sqlStr', and then I use that string and pass it to a function which runs SQL Code by opening a connection with ADODB, connecting to a 'serverName' and 'databaseName'... there are hundreds of...
  19. S

    ADODB Connection unable to run

    Hi, I am not sure if this is an Excel Question or Access Question, maybe neither. I have code in vba that extract data from accdb file using adodb connection. For some reason when i take this code to another computer where it doesn't have access installed, it got a system error &h00400etc. Has...
  20. H

    Excel VBA - RecordSet To Array

    I have an SQL Query which returns a subset of data from one worksheet to another worksheet. I was hoping that instead of returning the data to a worksheet I might be able to return the data to an array instead. Here is my query: Dim sel As New cls_Selected Sub Data_Ext_From_Excel()...

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top