How To Generate ConnectionString By Using Notepad??

Answer Posted / kesavan

StreamReader fStream = new StreamReader(Application.StartupPath + "/Coninfo.ini");
fStream.BaseStream.Seek(0, SeekOrigin.Begin);
companyId = fStream.ReadLine().ToString().Substring(20);
ComPanyName = fStream.ReadLine().ToString().Substring(20);
serverName = fStream.ReadLine().ToString().Substring(20);
userId = fStream.ReadLine().ToString().Substring(20);
Password = fStream.ReadLine().ToString().Substring(20);
dataBase = fStream.ReadLine().ToString().Substring(20);
dbPath = fStream.ReadLine().ToString().Substring(20);
dbType = fStream.ReadLine().ToString().Substring(20);
fStream.Close();

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is session mode in asp.net?

517


List some of the important session state modes of asp.net.

498


What are the media types of http requests and response?

508


What is difference between session and cookies?

543


Asp pages that worked pefectly on windows 2000 server and iis 5.0 do not work on windows 2003 server with iis 6.0. Asp.net pages work fine. Why?

557






What is server side routing?

499


Explain what are webservices?

539


What are type/key pairs in client script registration? Can there be 2 scripts with the same type/key pair name?

535


Define repository pattern in mvc.net? : asp.net mvc

512


What is ashx file in asp.net?

545


Define transparent caching with aop?

530


Where web.config file is used?

565


Why session is more secure than cookies?

492


What is the difference between a candidate key and primary key?

519


How do cookies work?

590