What does this innerException mean?

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Sep 2006
Posts: 88
Reputation: bajanpoet is an unknown quantity at this point 
Solved Threads: 0
bajanpoet bajanpoet is offline Offline
Junior Poster in Training

What does this innerException mean?

 
0
  #1
Sep 3rd, 2007
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?
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 322
Reputation: Hamrick will become famous soon enough Hamrick will become famous soon enough 
Solved Threads: 33
Hamrick's Avatar
Hamrick Hamrick is offline Offline
Posting Whiz

Re: What does this innerException mean?

 
0
  #2
Sep 3rd, 2007
What are you doing in the form_Load event or constructor?
The truth does not change according to our ability to stomach it.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 88
Reputation: bajanpoet is an unknown quantity at this point 
Solved Threads: 0
bajanpoet bajanpoet is offline Offline
Junior Poster in Training

Re: What does this innerException mean?

 
0
  #3
Sep 4th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 322
Reputation: Hamrick will become famous soon enough Hamrick will become famous soon enough 
Solved Threads: 33
Hamrick's Avatar
Hamrick Hamrick is offline Offline
Posting Whiz

Re: What does this innerException mean?

 
0
  #4
Sep 4th, 2007
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?
The truth does not change according to our ability to stomach it.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 88
Reputation: bajanpoet is an unknown quantity at this point 
Solved Threads: 0
bajanpoet bajanpoet is offline Offline
Junior Poster in Training

Re: What does this innerException mean?

 
0
  #5
Sep 4th, 2007
Here's the connection string
  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
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 322
Reputation: Hamrick will become famous soon enough Hamrick will become famous soon enough 
Solved Threads: 33
Hamrick's Avatar
Hamrick Hamrick is offline Offline
Posting Whiz

Re: What does this innerException mean?

 
0
  #6
Sep 4th, 2007
The data source part of the connection string refers to an mdb file, not a folder path. I think it should be like this.
  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.
The truth does not change according to our ability to stomach it.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 88
Reputation: bajanpoet is an unknown quantity at this point 
Solved Threads: 0
bajanpoet bajanpoet is offline Offline
Junior Poster in Training

Re: What does this innerException mean?

 
0
  #7
Sep 4th, 2007
Thanks Hanrick! I didn't even realize that I'd forgotten to add the name of my database!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC