Access - Update on table without using VBA module

0

I need to update a table once a month, in which the inserted data should be placed in its current month. I have done this using VBA code, but since the table has approximately 30,000 lines, the process is time consuming. I would like to perform the process via Access Query. Has anyone ever faced the same problem? If not, is there a way to optimize this process via vba code?

    
asked by anonymous 28.03.2018 / 20:09

1 answer

1

Do you want to save excel data in Access? If so, here is an example of a method that receives the excel data as parameters (can be implemented in a looping) and inserts into Access.

Sub INSERT_EMAIL(protocolo, EMAIL)

    strConOracle = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\db.accdb" 
    Set oConOracle1 = CreateObject("ADODB.Connection")
    oConOracle1.Open strConOracle


    'On Error Resume Next
    oConOracle1.Execute ("INSERT INTO TABELA_ACCESS (PROTOCOLO,END_EMAIL) VALUES  (" & protocolo & " , """ & EMAIL & """ ) ")



    oConOracle1.Close
    Set oConOracle1 = Nothing


End Sub
    
28.03.2018 / 22:30