Click here to Skip to main content
15,896,063 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhow can i use one connection to upload multiple files in vb.net Pin
koriewhite16-Jun-16 4:31
koriewhite16-Jun-16 4:31 
QuestionKeep database in program folder instead of default SQL server folder. Pin
desanti14-Jun-16 7:05
desanti14-Jun-16 7:05 
AnswerRe: Keep database in program folder instead of default SQL server folder. Pin
Eddy Vluggen14-Jun-16 7:14
professionalEddy Vluggen14-Jun-16 7:14 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
desanti14-Jun-16 7:56
desanti14-Jun-16 7:56 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
Eddy Vluggen14-Jun-16 8:26
professionalEddy Vluggen14-Jun-16 8:26 
AnswerRe: Keep database in program folder instead of default SQL server folder. Pin
Dave Kreskowiak14-Jun-16 7:34
mveDave Kreskowiak14-Jun-16 7:34 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
desanti14-Jun-16 7:56
desanti14-Jun-16 7:56 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
Dave Kreskowiak14-Jun-16 8:59
mveDave Kreskowiak14-Jun-16 8:59 
Putting your program off the root of C: will just piss off system admins. Permission control becomes an issue with them and results in more work.

Unless the SQL Server is local on the machine, you really don't have control over where the file goes.

But, if it is local, you have to execute the query to create a database manually and tell SQL Server where to put the files. Assuming SQL Server, you have to attach to the master database in your connection string and then execute the following SQL against it:
SQL
CREATE DATABASE MyDatabase
ON
( NAME = N'MyDatabase_data',
    FILENAME = N'C:\MyProgram1\MyDatabaseData.mdf',
    SIZE = 100,
    MAXSIZE = UNLIMITED,
    FILEGROWTH = 5 )
LOG ON
( NAME = N'MyDatabase_log',
    FILENAME = N'C:\MyProgram1\MyDatabaselog.ldf',
    SIZE = 100,
    MAXSIZE = UNLIMITED,
    FILEGROWTH = 5 )

All sizes are in MB by default. You can read up more on the CREATE DATABASE statement in the documentation[^].
A guide to posting questions on CodeProject

Click this: Asking questions is a skill.
Seriously, do it.

Dave Kreskowiak

AnswerRe: Keep database in program folder instead of default SQL server folder. Pin
Gerry Schmitz16-Jun-16 8:01
mveGerry Schmitz16-Jun-16 8:01 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
desanti18-Jun-16 8:12
desanti18-Jun-16 8:12 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
Gerry Schmitz18-Jun-16 8:20
mveGerry Schmitz18-Jun-16 8:20 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
desanti18-Jun-16 9:38
desanti18-Jun-16 9:38 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
Mycroft Holmes18-Jun-16 13:32
professionalMycroft Holmes18-Jun-16 13:32 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
desanti18-Jun-16 14:17
desanti18-Jun-16 14:17 
GeneralRe: Keep database in program folder instead of default SQL server folder. Pin
Mycroft Holmes18-Jun-16 16:48
professionalMycroft Holmes18-Jun-16 16:48 
QuestionUse a different dll for each project's form Pin
desanti14-Jun-16 2:50
desanti14-Jun-16 2:50 
AnswerRe: Use a different dll for each project's form Pin
Dave Kreskowiak14-Jun-16 4:21
mveDave Kreskowiak14-Jun-16 4:21 
GeneralRe: Use a different dll for each project's form Pin
desanti14-Jun-16 5:11
desanti14-Jun-16 5:11 
GeneralRe: Use a different dll for each project's form Pin
Dave Kreskowiak14-Jun-16 5:32
mveDave Kreskowiak14-Jun-16 5:32 
GeneralRe: Use a different dll for each project's form Pin
Eddy Vluggen14-Jun-16 7:16
professionalEddy Vluggen14-Jun-16 7:16 
GeneralRe: Use a different dll for each project's form Pin
desanti14-Jun-16 8:11
desanti14-Jun-16 8:11 
GeneralRe: Use a different dll for each project's form Pin
Eddy Vluggen14-Jun-16 10:11
professionalEddy Vluggen14-Jun-16 10:11 
QuestionVisual Basic and Access Database updating Pin
jbassmanp9-Jun-16 2:16
jbassmanp9-Jun-16 2:16 
QuestionRe: Visual Basic and Access Database updating Pin
ZurdoDev9-Jun-16 2:32
professionalZurdoDev9-Jun-16 2:32 
AnswerRe: Visual Basic and Access Database updating Pin
Dave Kreskowiak9-Jun-16 2:50
mveDave Kreskowiak9-Jun-16 2:50 

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.