Hi
I have a work sheet I want the user to click the button and insert the data excel sheet into oracle table
how to do this please ?
Thanks
Hi
I have a work sheet I want the user to click the button and insert the data excel sheet into oracle table
how to do this please ?
Thanks
Use ADO for any CRUD activity.
http://www.w3schools.com/asp/ado_intro.asp
Happy Computing ,
Xlbiznes.
To show your appreciation please click *
Can you provide me with an example PLS ?
I write this code but it gave me an error
PLS advise
find attached file
Sub uploadListOfItems()
'Oracle connection variables
Dim dbUserName As String
Dim dbPassword As String
dbUserName = "ORACLE_USERNAME"
dbPassword = "ORACLE_PASSWORD"
Dim dbDSN As String
dbDSN = "MY_TNS_ALIAS"
'Create and Set Session / Create Dynaset = Column Names
Dim OraSession As Object
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
Dim OraDatabase As Object
Set OraDatabase = OraSession.OpenDatabase("test101", "apps" / "apps")
Dim Oradynaset As Object
Set Oradynaset = OraDatabase.DBCreateDynaset("SELECT * FROM MY_ORACLE_TABLE", 0&)
'Upload data variables
Dim site As String
Dim item As String
'Initialize upload
ActiveSheet.Activate
Range("A2").Select
order_id = 1
'Iterate through each cell and upload to MY_ORACLE_TABLE
Do Until Selection.Value = ""
site = ActiveCell.Value
item = ActiveCell.Offset(0, 1).Value
'Add new record
Oradynaset.AddNew
Oradynaset.Fields("USERNAME").Value = Application.UserName
Oradynaset.Fields("SITE").Value = site
Oradynaset.Fields("ITEM").Value = item
Oradynaset.Update
Selection.Offset(1, 0).Select
order_id = order_id + 1
Loop
End Sub
Try this .
Please Login or Register to view this content.
Please Login or Register to view this content.
# Thanks a lot
Last edited by Khaled Diab; 11-25-2014 at 09:13 AM.
you are welcome, please enclose the code in your earlier post using #.
Done !
I meant post #4 and the entire code that you posted without the code block tag #.
Select the entire code in your post #4 and then click on the # icon.
Excuse me but i dont know what you are talking about
You post #4 should look like this :
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks