wakeup

Insert in a database without using logging and db link

1 post in this topic

I would like to insert values in a database from CX-supervisor, but in a free way, without using dababase link and loging features. I did this code en exce-vba, but I cannt use it in cx-supervisor because it doesn't recognice ADODB object. How can I configure it? It is a com object and not an activeX thanks Set objMyConn = New ADODB.Connection Set objMyCmd = New ADODB.Command objMyConn.ConnectionString = "Provider=SQLOLEDB;Server=xxx\SQLEXPRESS;Database=testlab;User Id=sa;Password=xxx;" objMyConn.Open 'Set and Excecute SQL Command' Set objMyCmd.ActiveConnection = objMyConn 'objMyCmd.CommandText = "insert into dbo.test ('nombre') values ('hola')" objMyCmd.CommandText = "INSERT INTO [dbo].[test] ([nombre]) Values ('eeee')" objMyCmd.CommandType = adCmdText objMyCmd.Execute objMyConn.Close

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now