473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

sqlconnection in Web.config and class file

What is the difference between giving a sql connection in Web.config and in a class file?
thanks in advance
raghul
Jan 11 '08 #1
2 1497
r035198x
13,262 8TB
What is the difference between giving a sql connection in Web.config and in a class file?
thanks in advance
raghul
If you give the connection string in the Web.config file then when you need to change it, you only change one place in the config file.
Jan 11 '08 #2
kunal pawar
297 100+
If ur sql connection string is in WEb.config, then u can change it at any time more easily and nopt need to compile ur code. but if u store in class file then after change conection string need to compile u project
Jan 11 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Maxim Khesin | last post by:
I want to have a config file with my python proggie, satisfying the following requirements: 1) support key->(value, default) 2) simple and intuitive to read and edit 3) easyly readable into a...
4
by: grs | last post by:
Can a class library have a app.config file. Reason for asking is that the microsoft application blocks all read from myApp.exe.config. How can you use the application blocks if you do not have an...
1
by: Tom Hartnett | last post by:
I just noticed that the SqlConnection class will not accept "file name=c:\SomeUDL.udl" as its connectionstring property. However, the OleDbConnection class will use it. Can anyone tell me why? ...
2
by: MrMike | last post by:
I have a web.config file containing the SQLConnection String to a SQL Database. Before I implemented this SQLConnection String into web.config, I had individual SQLConnection objects in each...
3
by: Catadmin | last post by:
Hello, Everyone. I have a strange one here. I'm a DBA with relatively low program experience. Recently I was given an assignment to locate why our SQL Server has "orphaned" connections. The...
16
by: Timm | last post by:
I'm trying to use ASP objects (basically formed and populated based on Web.Config settings) and I want to use them in a different non-asp program with minimal reprogramming. So, my question is how...
2
by: Robert Bravery | last post by:
HI all, I'm trying my hand at async processing. I have the following, my question is where do I close the sql connection. Do I close it in this function or in the ExecCallback function, if so...
6
by: TS | last post by:
I cannot get this to work. I added an app.config to a project i reference from my web application project (vs 05) but can see no way to access the settings within it. the other thing is that I...
3
bencoding
by: bencoding | last post by:
Wow, I've spent about 3 hrs now trying to figure this one out, none of the articles online were able to help me and some were using system libraries that were obsolete......anyways, I am able to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.