Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying connecting to SQLSERVER to insert data into a table.
The following script is attached to a button.
When I press the button the script page is open letting me know the script is not doing anything because of a error.
the connection string is not working here but if I use it in the loading script it works correctly.
can somebody help me?
sub testSomeButtons
dim sConn, oConn
rem Set oConn = Nothing
Set oConn = CreateObject("ADODB.Connection")
sConn = "Provider=SQLOLEDB.1;Data Source=xxxxxxxx;Initial Catalog=xxxxxxx;User Id=xxxxxxxx;(XPassword is XXXXXXXXXXXX);"
oConn.Open sConn
rem sSQL="INSERT INTO [dbo].[mydb] ([text]) VALUES ('pippo')"
rem oConn.Execute(sSQL)
rem oConn.Close
rem Set oConn = Nothing
msgbox("It's allright")
end sub
my fault. found the error so the problem is solved.
Hi Mauro,
We're glad to see you were able to find the error. If you can, please post a short explanation of how you resolved this so that it may help others who have the same error.
Thank you,
Qlik Community Team