All Things WinBatch > WebBatch
SQL Connection String
Jeff:
Hi all.
I am tinkering with WebBatch for the first time and doing a small project to get an understand of it. I am connecting to a SQL server database and pulling the DB information as expected. <I am proud!>
My current problem is the connection string is sitting in plain text with a SQL user name and password. I do not have the option to use domain authentication as part of the connection string. So, is there a way to hide or encrypt the connection string so the SQL username and password is not sitting in plain text?
SQLConn.ConnectionString = "Provider=SQLOLEDB;Data Source=MyServer;Initial Catalog=MyDataBase;User ID=MyUserId;Password=MyPassword"
td:
You could split your script into separate scripts and compile the script with sensitive information using the "Encode for calls from EXE files" compiler option. You can then call the compiled .wbc file from a plan text .web script.
Jeff:
Ok, I like the thought process, but I have some questions.
Can I call another exe from a WEBBATCH script?
Where is the material on making this work?
td:
You do not need to call "another exe" to call a compile .wbc file from WebBatch script. You just use the WIL Call function to execute the encoded script from your WebBatch script. You treat the .wbc file just like you would any other script you execute using the WIL Call function.
Not sure what you mean by "material" but the compiler is documented in the Consolidated WIL Help file. Go to:
Home > WinBatch Users Guide > Compiler > Compile Options > Encode for Call's from EXE files
Jeff:
Thanks-I just need to find the reading material or an example.
Navigation
[0] Message Index
[#] Next page
Go to full version