Hi,
I want to check whether database name entered by user is already exists or not using VBScript custom action. I have created ScriptInline custom action for this.
I am able to get all the database names in sql server by Session.Property("SqlServerDatabases"). Now I want to check whether database name (DATABASE_PROP)
exists in the Session.Property("SqlServerDatabases") or not. Below is my scriptinline code. But every time If condition is always evaluated to false even if I entered existing database name.
m = Split(Session.Property("SqlServerDatabases"),","):for each c in m:If CStr(c) = CStr(Session.Property("DATABASE_NAME")) Then:MsgBox("Database name exists"):Set Session.Property("DATABASENAME_ISVALID") = 0:End If:next
One more thing: Is there any limit in length of VB script text? Because VBScript text is cut in the custom action Script Text text box.
Please help me to solve my problem
Thanks,
Viral
FOLLOW US
Get the latest news in Application Packaging