|
Comet Software
|
 |
« Reply #1 on: August 10, 2011, 05:18:54 PM » |
|
First, we corrected the original post (OP) to this thread to reflect that the connection string generated/supplied by myLittleAdmin does NOT include the "Password" attribute. We thought that if the user was specified that it made sense that the password would be required, so, we included it on all future testing.
As to the solution, the myLittleAdmin connection string does not include a "Provider" attribute, so, as stated in the OP we tried adding the "Provider=SQLOLEDB;" attribute, but, that did not change the error message. Although Lunarpages tech support still seemed to think that there was a syntax error in the connection string, we stated that Googling indicated that it wasn't a syntax error. We specifically asked about "Provider" and they replied that the provider should be "Provider=SQLOLEDB.1;" and that changed the error message to:
Microsoft OLE DB Provider for SQL Server: Invalid connection string attribute
This tells us that we have hit upon the correct provider, but, some other attribute doesn't apply. The only hints that Googling gave was making this change: "Integrated Security=SSPI". This did not change the error message. At this point we set up numerous Scheduler tasks to try various combinations of attributes and values. As it turns out, the "Integrated Security" attribute needed to be removed completely.
At this point we were able to successfully connect to our database via our VBScript with this connection string:
Provider=SQLOLEDB.1;Data Source=209.200.235.3;Network Library=;Connection Timeout=2000;Packet Size=4096; User ID=myUser;Password=myPassword;Encrypt=no;Initial Catalog=myDatabase;
We have not tried changing our Web.config file to reflect this different connection string. Maybe at some point in the future, when we have nothing better to do, we will test this connection string.
Now we have some questions to help us understand a few things - and maybe to help others that come across this thread in the future.
Generically we can understand how two different programming languages might need different connection strings, especially since VBScript is considered to be older technology compared to .NET Framework. So, even though both are Microsoft technologies, obviously there is something different about what they need - or what attributes/values are considered to be defaults or "expected". The question becomes generically what is different about VBScript compared to ASP.NET (with Visual Basic code-behind) that would cause them to require different connection strings?
We created our MSSQL database and user in Plesk, and, myLittleAdmin shows us the connection string. We can understand why that connection string would not include some default attributes such as "Provider". But, we are a little confused as to why it would generate/specify the "Integrated Security=no" attribute - especially when it seems that the default value for "Integrated Security" works for VBScript. So, one question is what is the difference between "Integrated Security=no" and leaving it out to basically implement the default value? We are also confused as to why myLittleAdmin would create/generate a connection string that would include the "User ID" attribute, but, not include the "Password" attribute. We understand from a security standpoint why they would not show the exact password value, but, why can't myLittelAdmin at least include something like "Password=**********;" in the connection string to indicate that it is required when the "User ID" attribute is specified?
Obviously the tech support employees at Lunarpages know what the default values for connection string attributes are for their SQL servers. Since it would not "damage" the connection string to explicitly include attributes set to their default values, why doesn't myLittleAdmin include those attributes and their default values? Not only would this explicitly tell us the value assigned to an attribute, but, we could also use those values as a learning tool to better understand connection strings. Along those lines, to help people resolve these issues in the future, are the default values for connection string attributes displayed somewhere on the Lunarpages site? Certainly Lunarpages might consider it a security risk to display those values to the public, but, wouldn't it be a simple/smart thing for Lunarpages tech support to include these default values in ANY/ALL help ticket "replies" to any question/issue that involves connection strings?
|