Click here to Skip to main content
15,896,726 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello Everyone,

I have a UDL file which points to a Database on SQL Server 2008.I want only one connection string pointing to the UDL File via Multiple forms without using app.config.Can anyone help me with this?

Thanks
Posted
Updated 27-Oct-14 6:22am
v2
Comments
ZurdoDev 27-Oct-14 15:44pm    
I don't follow. What exactly do you need help with?
vivek murli 27-Oct-14 23:30pm    
Thanks for replying RyanDev.I have a .udl file which I am using to connect to a database on sql server 2008.But the thing is on click of submit button say on Form 1 or Form 2 a new connection is established to the database ie multiple connections via Form 1 and Form 2 because I am writing OleDbConnection conn = new OleDbConnection("File Name=E:\\Vivek\\License Manager\\License Manager\\login.udl"); on button click of both Form 1 and Form 2.So how to use only one common connection string that an entire application can use ?

I hope my doubt is clear

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900