943,931 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 5257
  • VB.NET RSS
You are currently viewing page 1 of this multi-page discussion thread
Sep 23rd, 2007
0

Visual Web Developer 2005 problem

Expand Post »
Hi all

Ive been working on a VW2005 project and constantly been getting the following error message... Ive been debugging the program for quite some time now and still cant figure out where the problem lies...

VB.NET Syntax (Toggle Plain Text)
  1. Format of the initialization string does not conform to specification starting at index 0.
  2.  
  3. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
  4.  
  5. Exception Details: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.
  6.  
  7. Source Error:
  8.  
  9. An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
  10. Stack Trace:
  11.  
  12. [ArgumentException: Format of the initialization string does not conform to specification starting at index 0.]
  13. System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue) +1284
  14. System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +115
  15. System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +99
  16. System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +52
  17. System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +25
  18. System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +141
  19. System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +38
  20. System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +4
  21. System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +128
  22. System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +13
  23. System.Web.UI.WebControls.DataBoundControl.PerformSelect() +140
  24. System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +68
  25. System.Web.UI.WebControls.GridView.DataBind() +5
  26. System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +61
  27. System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +67
  28. System.Web.UI.Control.EnsureChildControls() +97
  29. System.Web.UI.Control.PreRenderRecursiveInternal() +50
  30. System.Web.UI.Control.PreRenderRecursiveInternal() +171
  31. System.Web.UI.Control.PreRenderRecursiveInternal() +171
  32. System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5729

Any help with thatv??
Last edited by yagapapa; Sep 23rd, 2007 at 8:32 am.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
yagapapa is offline Offline
15 posts
since Mar 2007
Sep 23rd, 2007
0

Re: Visual Web Developer 2005 problem

It looks like your connection string is the issue

It should look like
VB.NET Syntax (Toggle Plain Text)
  1. Data Source=SERVERNAME;Initial Catalog=DATABASENAME;UID=USERNAME;PWD=PASSWORD
If this is not the issue could you then post the ConnectionString and the SQL Statment
Reputation Points: 16
Solved Threads: 19
Junior Poster
ptaylor965 is offline Offline
169 posts
since Oct 2006
Sep 23rd, 2007
0

Re: Visual Web Developer 2005 problem

This is my connection string from my web.config file...

Um...Im not sure where the problem could be lying because this connection was generated by the system...I didnt do any tweaking myself...

VB.NET Syntax (Toggle Plain Text)
  1. connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Ratios.mdf;Integrated Security=True;User Instance=True"

You will notice that my database name is Ratios...
Last edited by yagapapa; Sep 23rd, 2007 at 2:59 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
yagapapa is offline Offline
15 posts
since Mar 2007
Sep 23rd, 2007
0

Re: Visual Web Developer 2005 problem

the connection string that you have sent is just attaching the database file to the server and is not trying to open the database.

change the connection string to the following :
Data Source=SERVERNAME;Initial Catalog=DATABASENAME;UID=USERNAME;PWD=PASSWORD

The above will only work if you are trying to connect to the database.

Bharat


Click to Expand / Collapse  Quote originally posted by yagapapa ...
This is my connection string from my web.config file...

Um...Im not sure where the problem could be lying because this connection was generated by the system...I didnt do any tweaking myself...

VB.NET Syntax (Toggle Plain Text)
  1. connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Ratios.mdf;Integrated Security=True;User Instance=True"

You will notice that my database name is Ratios...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bharatsaboo is offline Offline
7 posts
since Sep 2007
Sep 23rd, 2007
0

Re: Visual Web Developer 2005 problem

This would make your ConnectionString
VB.NET Syntax (Toggle Plain Text)
  1. connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=Ratios;Integrated Security=True;User Instance=True"
Reputation Points: 16
Solved Threads: 19
Junior Poster
ptaylor965 is offline Offline
169 posts
since Oct 2006
Sep 23rd, 2007
0

Re: Visual Web Developer 2005 problem

I still get the same error even after changing the connection string...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
yagapapa is offline Offline
15 posts
since Mar 2007
Sep 24th, 2007
0

Re: Visual Web Developer 2005 problem

Try the following

strConnect = "Driver={SQL Server};Server=<server address>;Database=<database>;UID=;PWD="

OR

connectionString="Data Source=DSN Name;Initial Catalog=Ratios;Integrated Security=True;User Instance=True"

Click to Expand / Collapse  Quote originally posted by yagapapa ...
I still get the same error even after changing the connection string...
Last edited by bharatsaboo; Sep 24th, 2007 at 3:53 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bharatsaboo is offline Offline
7 posts
since Sep 2007
Sep 24th, 2007
0

Re: Visual Web Developer 2005 problem

Try the following

strConnect = "Driver={SQL Server};Server=<server address>;Database=<database>;UID=;PWD="

OR

connectionString="Data Source=DSN Name;Initial Catalog=Ratios;Integrated Security=True;User Instance=True"
I tried the latter code, i still get the same error, I didnt try the former cos im not sure about the "SQL Server" and the "server address" or do i just copy and paste it exactly like that ??
Reputation Points: 10
Solved Threads: 0
Newbie Poster
yagapapa is offline Offline
15 posts
since Mar 2007
Sep 24th, 2007
0

Re: Visual Web Developer 2005 problem

Try the following

strConnect = "Driver={SQL Server};Server=<server address>;Database=<database>;UID=;PWD="

OR

connectionString="Data Source=DSN Name;Initial Catalog=Ratios;Integrated Security=True;User Instance=True"
I tried the latter code and i still get the same error, I didnt try the former cos im not sure about the "SQL Server" and the "server address" or do i just copy and paste it exactly like that ??
Reputation Points: 10
Solved Threads: 0
Newbie Poster
yagapapa is offline Offline
15 posts
since Mar 2007
Sep 24th, 2007
0

Re: Visual Web Developer 2005 problem

OK Try This.

Place a Label on your page called lblError

then add the word "Try" at the top of the Sub/Function that Errors

and add
Catch ex as Exception
lblerror.text = ex.message
End Try

to the end of the Sub/Function

and post back the message it produces

Example
http://www.taylorsnet.co.uk/SourceCo...spx?SourceID=6

This should give a better Error Massage
Last edited by ptaylor965; Sep 24th, 2007 at 2:43 pm.
Reputation Points: 16
Solved Threads: 19
Junior Poster
ptaylor965 is offline Offline
169 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Solution for slow systems
Next Thread in VB.NET Forum Timeline: right click message send to operating system





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC