Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Custom data access object error
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Custom data access object error
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01148744
Message ID:
01148744
Vues:
121
I created a custom data access object to try to resolve problems saving records to a table because of an error indicating that no type was defined for a field. I followed the instructions in the help file but what I get on the screen is slightly different from what the help file says.

I created a new mmDataAccessOleDb class. When I bring up the design surface, it already has a connection object on it that cannot be deleted. When I add the OleDbDataAdapter object, that adds a 2nd connection object that can be deleted but I still can't get ride of the first connection object.

I used the pull down for the connection object to select the connection I have set up in the web.config file.

When I try to run the application, I get an error when the connection code runs saying that the connection is not set to an instance of an object. I noticed that, in the code that was generated, it didn't include the name of the database in the connection string, so I added that. Now I get an error on the design surface that I cannot get to go away. That is listed below.
 One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. 

Format of the initialization string does not conform to specification starting at index 20. 
Hide     

at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
at System.ComponentModel.Design.InheritedPropertyDescriptor.SetValue(Object component, Object value)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement) 
I think this must be due to that additional connection object but I'm not sure what to do to get rid of it.

Any suggestions? Thanks.

Linda
Linda Harmes
HiBit Technologies, Inc.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform