Click here to Skip to main content
16,008,490 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how to create .mdf file Pin
Abhijit Jana5-Oct-07 3:19
professionalAbhijit Jana5-Oct-07 3:19 
GeneralRe: how to create .mdf file Pin
bhattiprolu5-Oct-07 3:29
bhattiprolu5-Oct-07 3:29 
GeneralRe: how to create .mdf file Pin
Abhijit Jana5-Oct-07 3:42
professionalAbhijit Jana5-Oct-07 3:42 
GeneralRe: how to create .mdf file Pin
bhattiprolu5-Oct-07 3:51
bhattiprolu5-Oct-07 3:51 
GeneralRe: how to create .mdf file Pin
Abhijit Jana5-Oct-07 4:13
professionalAbhijit Jana5-Oct-07 4:13 
GeneralRe: how to create .mdf file Pin
bhattiprolu5-Oct-07 4:34
bhattiprolu5-Oct-07 4:34 
GeneralRe: how to create .mdf file Pin
Abhijit Jana5-Oct-07 4:42
professionalAbhijit Jana5-Oct-07 4:42 
AnswerRe: how to create .mdf file Pin
Abhijit Jana5-Oct-07 3:25
professionalAbhijit Jana5-Oct-07 3:25 
SqlConnection myConn = new SqlConnection("Server=" + servername + " ;Integrated security=SSPI;database=master");

str = "CREATE DATABASE " + Database name + " ON PRIMARY " +
"(NAME = MyDatabase_Data, " + mdf_filename +
//"FILENAME = 'C:\\MyDatabaseData.mdf', " +
"SIZE = 2MB, MAXSIZE = 10MB, FILEGROWTH = 10%) " +
"LOG ON (NAME = MyDatabase_Log, " + ldf_filename +
//"FILENAME = 'C:\\MyDatabaseLog.ldf', " +
"SIZE = 1MB, " +
"MAXSIZE = 5MB, " +
"FILEGROWTH = 10%)";

SqlCommand myCommand = new SqlCommand(str, myConn);
myConn.Open();
myCommand.ExecuteNonQuery();

It will create database as well ur mdf file ....... Smile | :)

Happy Programming
-----
Abhijit

Questionradio button properties Pin
venky4565-Oct-07 2:56
venky4565-Oct-07 2:56 
QuestionHow to Make a Password Strength Meter Like Google Pin
ajay588865-Oct-07 1:46
ajay588865-Oct-07 1:46 
AnswerRe: How to Make a Password Strength Meter Like Google Pin
Christian Graus5-Oct-07 2:00
protectorChristian Graus5-Oct-07 2:00 
AnswerRe: How to Make a Password Strength Meter Like Google Pin
N a v a n e e t h5-Oct-07 2:25
N a v a n e e t h5-Oct-07 2:25 
AnswerRe: How to Make a Password Strength Meter Like Google Pin
Tarun Dudhatra8-Oct-07 0:20
Tarun Dudhatra8-Oct-07 0:20 
QuestionHow to update database record automatically? Pin
sanchet5-Oct-07 1:43
sanchet5-Oct-07 1:43 
QuestionUnable to run asp.net page on IIS server Pin
ShuklaGirish5-Oct-07 1:28
ShuklaGirish5-Oct-07 1:28 
AnswerRe: Unable to run asp.net page on IIS server Pin
Abhijit Jana5-Oct-07 1:38
professionalAbhijit Jana5-Oct-07 1:38 
GeneralRe: Unable to run asp.net page on IIS server Pin
ShuklaGirish5-Oct-07 1:51
ShuklaGirish5-Oct-07 1:51 
GeneralRe: Unable to run asp.net page on IIS server Pin
Paras Kaneriya5-Oct-07 2:01
Paras Kaneriya5-Oct-07 2:01 
GeneralRe: Unable to run asp.net page on IIS server Pin
Abhijit Jana5-Oct-07 2:03
professionalAbhijit Jana5-Oct-07 2:03 
QuestionIssue with Web Setup Project Pin
John Gathogo5-Oct-07 1:17
John Gathogo5-Oct-07 1:17 
Questionerror when trying to run application from the remote machine Pin
Dhyanga5-Oct-07 0:56
Dhyanga5-Oct-07 0:56 
AnswerRe: error when trying to run application from the remote machine Pin
Guffa5-Oct-07 1:43
Guffa5-Oct-07 1:43 
GeneralRe: error when trying to run application from the remote machine Pin
Dhyanga6-Oct-07 20:13
Dhyanga6-Oct-07 20:13 
AnswerRe: error when trying to run application from the remote machine Pin
Guffa7-Oct-07 1:22
Guffa7-Oct-07 1:22 
GeneralRe: error when trying to run application from the remote machine Pin
Dhyanga7-Oct-07 19:24
Dhyanga7-Oct-07 19:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.