Search results

  1. C

    ADO connect example?

    Re: reading a specific record, I can grab a recordset with DAO easily enough matching certain criteria, e.g., I create a recordset as I please so I can loop through specific records, and I call that recordset using this: Function fnServerRecordset(pSQL As String) As DAO.Recordset Dim qdf...
  2. C

    ADO connect example?

    Re: filling in a local table, using DAO/linked table, I often run a query that grabs the SQL server table data, and inserts into the local table, in one fell swoop, e.g., see below. Can't do that in batch in ADO? Has to be record by record? Imagine that would be slower then... sql="SELECT *...
  3. C

    ADO connect example?

    Thanks - client side is Access, but I want to connect to SQL server via ADO. Also, is there quick coding to take a SQL table and insert that data into a local access table using ADO? Maybe a related question is... can you link tables into Access via ADO versus DAO?
  4. C

    ADO connect example?

    Anyone please have sample coding to get me started doing the following using ADO: >> Connecting to SQL server table >> Reading records in a loop >> Reading a specific "query" record >> Updating a record THANKS!!! I googled a lot but can't find a comprehensive / user-friendly site (at least not...
  5. C

    ODBC error - trying again

    I hear you - IT is still trying but no luck so far. Ugh.
  6. C

    ODBC error - trying again

    I'm using a remote server so that shouldn't be an issue since the remote server and the SQL server are all on the same Company network. Also, I tried a "keep alive" subroutine that runs every 5 records... to reconnect one of the ODBC tables. Still not helping.
  7. C

    ODBC error - trying again

    BTW, when the error hits, if I just CONTINUE (F5) the VBA, it keeps working! Infuriating!
  8. C

    ODBC error - trying again

    Sorry to post again but just checking if someone else has run into this... I have linked tables via ODBC. The connection works fine for 10 to 15 mins, then randomly shuts down. Once I click "cancel" on the error, the coding picks right back up again (doing a batch process). IT has tried fixing...
  9. C

    Reconnect ODBC?

    I would agree that it seems the linked tables remain (of course), Access isn't adept at re-connecting. Or catching a mis-connection.
  10. C

    Reconnect ODBC?

    OKay more info. Getting sql server error 10054. I'll also google in the meantime. --------------------------- Microsoft SQL Server Login --------------------------- Connection failed: SQLState: '08001' SQL Server Error: 10054 [Microsoft][SQL Server Native Client 11.0]TCP Provider: An existing...
  11. C

    Reconnect ODBC?

    Hi - have you ever had a random disconnect to SQL server? I've gotten that but MORE relevant now, it seems our tech guys have implemented a time-out feature to disconnect ODBC connections after some time. Is there a way to "catch" such a disconnect and force a reconnection especially when...
  12. C

    ODBC gone mad?

    Yeah for end users I'm trying to avoid that. I re-tried putting Trusted_Connection = Yes in the string and so far seems to be working, so maybe just a fluke.
  13. C

    ODBC gone mad?

    I use connection strings to connect to SQL server and attach tables. For a while I used "SQL Server" such as: ODBC;Driver={SQL Server};Server=SERVER-NAME;Database=DATABASE-NAME;Uid=USER-NAME;Pwd=PASSWORD;Encrypt=No;Trusted_Connection=No This worked just fine. I could refer to the tables in...
  14. C

    DAO versus ADODB speed

    Yes - I'm building a complex report in Excel and grabbing different data elements as needed. If ADODB lookup is 50% faster (0.25 seconds versus 0.5 seconds), that would add up I guess.
  15. C

    DAO versus ADODB speed

    Hello - I often, for a quick data point lookup, use DAO, such as: Dim sql as string, qdf As DAO.QueryDef, rst as DAO.recordset sql = "SELECT BirthDate FROM tblPerson WHERE Name = 'John'" Set qdf = CurrentDb.CreateQueryDef("") qdf.Connect = CONNECTION_STRING qdf.ReturnsRecords = True qdf.sql =...
  16. C

    32 to 64 bit functions

    P.S. Maybe I don't have the right Tool references either? The database worked fine prior to 64-bit.
  17. C

    32 to 64 bit functions

    Hi - I had the following declarations that are now "expired"... how do I modernize them to 64 bit Access? Thanks! Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hdc As Long) As Long Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long Declare...
  18. C

    Resize detail/control along with form

    Hi - I have a web-browser control that takes up 100% of a form (on purpose). But if the user resizes the form, or maximizes it, I want the Form detail section + web-control to also re-size accordingly. Any suggestions? Thanks!
  19. C

    Before Update Event - not saving record, etc.

    Not using a bound form connected to the data I am updating. The subform looks at a temporary local table that mirrors the data I update via SQL. So it's client/server set up.
  20. C

    Before Update Event - not saving record, etc.

    I have a few subforms on a main form and when a record is changed, I use before/after update events to write data to a SQL server. It normally works perfectly fine. I can edit a row in a subform, click to the next row, and the data gets written. But if I edit a cell and then click on ANOTHER...
Back
Top Bottom