View Single Post
Old 23.03.2007, 15:49   #81
m4rk
Архивный участник
 
Join Date: Jan 2006
Posts: 607
Default

Sorry for reviving, but I need help configuring this.

I get the following error:
Quote:
Unhandled Exception: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.
at System.Data.Common.DbConnectionOptions.GetKeyValue Pair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String&
keyname, String& keyvalue)
at System.Data.Common.DbConnectionOptions.ParseIntern al(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
at System.Data.Common.DbConnectionOptions..ctor(Strin g connectionString, Hashtable synonyms, Boolean useOdbcRules)
at System.Data.SqlClient.SqlConnectionString..ctor(St ring connectionString)
at System.Data.SqlClient.SqlConnectionFactory.CreateC onnectionOptions(StringconnectionString, DbConnectionOptions previous)
at System.Data.ProviderBase.DbConnectionFactory.GetCo nnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
at System.Data.SqlClient.SqlConnection.ConnectionStri ng_Set(String value)
at NC.ToolNet.Database.DBAccess.CheckConnection(Int64 dbKey) in d:\project\hades\tool.net\library\toolnet\source\m ain\nc.toolnet\database\dbaccess.cs:line 70

at NC.ToolNet.Database.DBAccess.RunSPByName(String connName, String spName, SqlParameter[] paramArray) in d:\project\hades\tool.net\library\toolnet\source\m ain\nc.toolnet\database\dbaccess.cs:line 200
at NC.PetitionD.GmStatus.Clear() in d:\project\hades\tool.net\application\petition\pet itiond\gmstatus.cs:line 21
at NC.PetitionD.BusinessLogic.Start() in d:\project\hades\tool.net\application\petition\pet itiond\businesslogic.cs:line 45
at RetailPetiTest.Program.Main(String[] args)
and my connstring unencrypted is:
Quote:
SERVER=.\SQLSERVER;DATABASE=petition;UID=sa;PWD=ps
where ps is the correct password

First I though that maybe it was the .\ in the Server name but if I don't put that then it gives a sql connection error (the one about default setting doesn't allo remote connection)

I've also tried unsuccesfully with:
Quote:
SERVER=SQLSERVER2;DATABASE=petition;UID=sa;PWD=ps
(SQLSERVER2 is the Alias for .\SQLSERVER)
m4rk is offline