Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database connection within a class file (VS2005)

Status
Not open for further replies.

GavW

Programmer
Jan 13, 2006
58
GB
Hey all!

I have recently upgraded to Visual Studio 2005 from the 2003 version and have come across a problem with my class files. In VS 2003 the class files included a visual interface where database connections, datasets, commands etc. could be dropped into. VS 2005 does not offer this visual interface and I am coming across errors when attempting to upload my project to the Internet because what I had established on this visual interface cannot be found.

Could anybody help me with this problem?

Thanks
 
menu data? I just looked all over visual studio and cant see reference to that anywhere
 
I don't understand what you mean. Do you mean you are creating a class file like MyClass.vb, or do you mean an aspx page?

Jim
 
If i got it right, to connect to a class file you should create a new binding source. In your case select the 'object'. (Else you could select a database or a web service). (?)
 
right I know what your referring to now. The ObjectDataSource option within the Data menu.

It is drag and drop however and the class file that i am working with has no visual interface to drop this ObjectDataSource on to.

jbenson001 - yeah i am creating a class file like myclass.vb, except i am working in C#, so myclass.cs
 
A class file is non-visual, therefore you will not be able to drag and drop objects onto the design form. Anything you do, you will need to do in code. I am not sure what you think you have done in 2003, but a class file is non visual. You may be confusing it with something else you have done? Maybe you are thinking of a WebUserControl or a WebService?

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top