conn

  1. P

    Excel quitting for some unknown reason - doesn't even prompt about saving

    Hi A problem that's only started happening on my spreadsheet in the last couple of months. I've got some VBA that works fine if I sit there and watch it.....it does everything it should. It finishes all of its loops and Excel stays open as it should. Whereas if I don't sit there watching for...
  2. K

    ODBC --Connection Server 'ServerName' failed

    Hi, I have created a User DSN and successfully created a linked table in Microsoft Access with that DSN, however through excel vba when I tried to fetch data from that linked table an error message is displaying "ODBC --connection 'SERVERNAME' failed. However I am successfully able to fetch...
  3. K

    Excel VBA ERROR ODBC connection failed

    Hi, I have a linked table in ms-access which is linked to a sql server table, and when I am trying to fetch the data in excel via VBA from ms-access linked table the error message "ODBC connection failed" showing. Note:- I am manually successfully able to refresh ms-access linked table in...
  4. V

    macro cannot find the table??

    Hey there, I have following code like this: Private Sub CommandButton5_Click() Const adOpenKeyset = 1 Const adLockOptimistic = 3 Const WORKSHEETNAME As String = "MIP_solution" Const TABLENAME As String = "Table1" Dim conn As Object, rs As Object Dim tbl As ListObject...
  5. Kdbailey

    Workbook.Connections.Add2 Help

    I'm looking to create a workbook connection through VBA but not from a file. I have a connection string that I am going to use to connect to a SQL database, however I'm not having any luck actually getting it to show up on the connections UI. The logic basically is to 1) Run through sheets 2)...
  6. H

    Importing csv File into Access DB Using Excel VBA

    Hi All, I am having runtime error 2046 The Command or action RunSQL isn't available on the line with red font. Thanks for any help and insight. Sub UploadRelevantColumns() 'The path to create the new access database Dim StrPath As String 'An Access object Dim ObjAccess As Object...
  7. H

    Excel 2016 vba power query code not working in excel 2013

    Hi All, I am having runtime error 2046 The Command or action RunSQL isn't available on the line with red font. Thanks for any help and insight. Sub UploadRelevantColumns() 'The path to create the new access database Dim StrPath As String 'An Access object Dim ObjAccess As Object StrPath =...
  8. S

    SQLite and VBA: Cannot establish connection to open and work with database

    I have no prior experience with SQL databases, so this is my first try. Please bear with me... My database is a regular *.sqlite file which I'd like to connect to Excel through ADO interface using VBA. The connection string (ConnectionString) below is taken from...
  9. L

    Database SQL Server Connection using Class Module

    Guys I'm a newbie with OOP (Object-oriented programming) I need your assistance to develop a connection inside a class so I can get/access this connection on a module. Here below the function the connects to the SQL Server that is working fine. What I need is make reference to this function...
  10. M

    How to List CommandText from Connections

    I have about 30 connections connected to different excel sheets within 1 workbook. I want to know how to get the command text for each connection using VBA code. This is what I have thus far: Function Connections() Dim conn As WorkbookConnection Dim celltxt As String For Each conn In...
  11. sdruley

    ADODB - Trying to Open

    In the following,there is just one line of code I can't get right. Any ideas on this? I am trying to take a text string and upload it from my computer to an external server. The error message is [Microsoft][ODBC Drive Manager] Data source name not found and no default driver specified...
  12. RichardMGreen

    Dataset not bringing back all data from serveer

    Hi all I'v got a query that's supposed to bring back data into a recordset but it's only bringing back the first two columns. The query looks like this:- Option ExplicitDim conn As ADODB.Connection, cmd As ADODB.Command, rs As ADODB.Recordset Dim strConn As String, strQry As String Dim wsData...
  13. J

    vba code to retrieve data from sql database

    Hi, I am getting the following error message and am not sure how to get rid of this. 'Run-time error - 2147467259 (80004005): Method 'CopyFromRecordset' of object range failed. The VB code is as follows: Sub GetDataFromSql() Dim conn As New ADODB.Connection Dim rs As ADODB.Recordset Dim...

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