473,385 Members | 1,531 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,385 software developers and data experts.

Saving Database Connection using Config.ini

33
Ive been searching tutorial on youtube and other known sites on how to save/read the database connection on the config.ini file. Lets say i have this connection,
Expand|Select|Wrap|Line Numbers
  1. SQLServer:192.168.1.2
  2. UserName:sa
  3. Password:1234
  4. DatabaseName:SampleDB
  5.  
i find it easy to configure my connection if it would be setup that way but i find a hard time getting a tutorial for that. What would be the things to need if ill be setting up the connection that way. Thanks.
Feb 16 '15 #1
2 1454
Joseph Martell
198 Expert 128KB
Can you clarify what you are specifically having a difficult time with? Reading and writing an ini file with the correct format? Dealing with the default XML-based config file format that .net uses?
Feb 19 '15 #2
Denden
33
i am now using app.config. Thanks btw. Cheers
Feb 19 '15 #3

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

Similar topics

1
by: Lolli man | last post by:
HI, I am trying to connect to a database using Visual Studio .NET. I have created the SQlconnection string and when I am trying to create the DataAdapter using SQLDATAADAPTER tool it aks me to...
5
by: Ranier Dunno | last post by:
Hi, I'm writing a data layer, and would like all components to have a single place for retrieving a connection to the (SQL Server) database. Currently, I'm treating the connection as somewhat...
2
by: Michel Esber | last post by:
Hello, DB2 V7 FP14 running Linux. Our application constantly tests whether the database connection is still alive before sending new statements to the DB. A "values current timestamp"...
35
by: Terry Jolly | last post by:
Web Solution Goal: Have a global database connection Why: (There will be 30+ tables, represented by 30+ classes) I only want to reference the database connection once. I put the connection...
6
by: SemiNoviceProgramer | last post by:
Dear friends I started a new project in Visual studio 2005, then I added a database connection using the wizard (access database) the problem that when I press the save button on the automatically...
1
by: Mini Singh | last post by:
Hi All I am making an application in C++ which needs to be connected to Database like Sql Server or MsAccess..... How can i connect to database in C++. It's Urgent ..... Please reply
3
by: fniles | last post by:
In the Windows application (using VB.NET 2005) I use connection pooling like the following: In the main form load I open a connection using a connection string that I stored in a global variable...
2
by: daljeet30 | last post by:
Hi i m daljeet singh. i m using Visual C#.net 2005 but i have facing problem Following code i used in app.config file <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> ...
2
by: Vicky | last post by:
I have installed both SQL and visual studio 2005 in my computer having vista. I tried to establish the database connection using this code: SqlConnection conn = new SqlConnection("data source=...
2
by: kisore81178 | last post by:
Function x() Set conn = CreateObject("ADODB.Connection") Set rs = CreateObject("ADODB.Recordset") msgbox "Connected..................................."; Set strConnect =...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.