943,865 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Marked Solved
  • Views: 6423
  • VB.NET RSS
Sep 3rd, 2007
0

What does this innerException mean?

Expand Post »
I was working on a project in my VB.NET Express and suddenly my code that was working fine and starting up as normal gave me this error:

{"An error occurred creating the form. See Exception.InnerException for details. The error is: Format of the initialization string does not conform to specification starting at index 33."}

When I'm trying to run my application, it doesn't open my main form.

What does this mean - and how do I fix this?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
bajanpoet is offline Offline
96 posts
since Sep 2006
Sep 3rd, 2007
0

Re: What does this innerException mean?

What are you doing in the form_Load event or constructor?
Reputation Points: 180
Solved Threads: 34
Posting Whiz
Hamrick is offline Offline
322 posts
since Jun 2007
Sep 4th, 2007
0

Re: What does this innerException mean?

I had put a StatusStrip on the bottom of my form, and I was trying to get it to show the filename of the Access mdb file that the application is using. I even removed the Form_Load event, but it did not work.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
bajanpoet is offline Offline
96 posts
since Sep 2006
Sep 4th, 2007
0

Re: What does this innerException mean?

That's usually an error you get with malformed connection strings for ado.net. You mentioned access, are you trying to connect to the database at all? If you are, what does the connection string look like?
Reputation Points: 180
Solved Threads: 34
Posting Whiz
Hamrick is offline Offline
322 posts
since Jun 2007
Sep 4th, 2007
0

Re: What does this innerException mean?

Here's the connection string
VB.NET Syntax (Toggle Plain Text)
  1.  
  2. Dim DBSPATH As String = "C:\Documents and Settings\rgibson.FOODGROUP\My Documents\Visual Studio 2005\Projects\AR Van Router\"
  3.  
  4. Dim Testing_ODBC_ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBSPATH & ";User ID =Admin;Password=;"
I originally had the connection strings as constants, but my boss wanted a way that he could browse to another database with the same structure in another location, so I added the path to the DBSPATH variable.
Last edited by bajanpoet; Sep 4th, 2007 at 10:21 am. Reason: Added the DBSPATH variable to the code snippet
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
bajanpoet is offline Offline
96 posts
since Sep 2006
Sep 4th, 2007
0

Re: What does this innerException mean?

The data source part of the connection string refers to an mdb file, not a folder path. I think it should be like this.
vbnet Syntax (Toggle Plain Text)
  1. Dim DBSPATH As String = "C:\Documents and Settings\rgibson.FOODGROUP\My Documents\Visual Studio 2005\Projects\AR Van Router\myDatabase.mdb"
  2.  
  3. Dim Testing_ODBC_ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBSPATH & ";User ID =Admin;Password=;"
The error said index 33, and that's right where the data source part of the connection string starts.
Reputation Points: 180
Solved Threads: 34
Posting Whiz
Hamrick is offline Offline
322 posts
since Jun 2007
Sep 4th, 2007
0

Re: What does this innerException mean?

Thanks Hanrick! I didn't even realize that I'd forgotten to add the name of my database!
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
bajanpoet is offline Offline
96 posts
since Sep 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

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: VB.NetCF and Googlemaps Mobile
Next Thread in VB.NET Forum Timeline: Identify keyword





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


Follow us on Twitter


© 2011 DaniWeb® LLC