Click here to Skip to main content
15,891,473 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Converting string to integer Pin
Marc Soleda16-Jan-07 6:05
Marc Soleda16-Jan-07 6:05 
QuestionInformation from one pgm to another Pin
henur16-Jan-07 2:12
henur16-Jan-07 2:12 
AnswerRe: Information from one pgm to another Pin
Dave Kreskowiak16-Jan-07 5:26
mveDave Kreskowiak16-Jan-07 5:26 
GeneralRe: Information from one pgm to another Pin
henur16-Jan-07 10:04
henur16-Jan-07 10:04 
GeneralRe: Information from one pgm to another Pin
shreekar16-Jan-07 17:59
shreekar16-Jan-07 17:59 
GeneralRe: Information from one pgm to another Pin
Dave Kreskowiak17-Jan-07 5:38
mveDave Kreskowiak17-Jan-07 5:38 
QuestionConnection string in module? Pin
priya_p23316-Jan-07 1:56
priya_p23316-Jan-07 1:56 
AnswerRe: Connection string in module? Pin
Guffa16-Jan-07 3:48
Guffa16-Jan-07 3:48 
(Please try to write proper english. It's tiresome to have to read messages littered with SMS abbreviations and without anything that tells you where one sentence ends and the next begins.)

To create a connection in code, you just create an instance of the connection class for the specific database driver you are using. For an OleDb driver it will be:

Dim connection As OleDbConnection
connection = New OleDbConnection(connectionString)

Substitute connectionString with the actual connection string that you are using.

To make this code available from anywhere, put it in a static (shared in VB) method in some class:

Public Shared Function Connect() As OleDbConnection
   Dim connection As OleDbConnection
   connection = New OleDbConnection(connectionString)
   Return connection
End Sub


---
Year happy = new Year(2007);

QuestionCell alignment in DataGridView [modified] Pin
DA_Loring16-Jan-07 1:33
DA_Loring16-Jan-07 1:33 
AnswerRe: Cell alignment in DataGridView Pin
Dave Kreskowiak16-Jan-07 5:39
mveDave Kreskowiak16-Jan-07 5:39 
GeneralRe: Cell alignment in DataGridView Pin
DA_Loring16-Jan-07 22:45
DA_Loring16-Jan-07 22:45 
QuestionGRID Pin
AkshatSharma16-Jan-07 1:08
AkshatSharma16-Jan-07 1:08 
QuestionHow can I Download multiple file in ftp with .net Pin
Pravat Maskey16-Jan-07 0:41
Pravat Maskey16-Jan-07 0:41 
AnswerRe: How can I Download multiple file in ftp with .net Pin
shreekar16-Jan-07 0:54
shreekar16-Jan-07 0:54 
QuestionPrint preivew Pin
Socheat.Net16-Jan-07 0:10
Socheat.Net16-Jan-07 0:10 
AnswerRe: Print preivew Pin
shreekar16-Jan-07 17:41
shreekar16-Jan-07 17:41 
QuestionRe: Print preivew [modified] Pin
shreekar16-Jan-07 0:58
shreekar16-Jan-07 0:58 
QuestionListbox name edit Pin
Ultima Reborn15-Jan-07 23:58
Ultima Reborn15-Jan-07 23:58 
AnswerRe: Listbox name edit Pin
Dave Kreskowiak16-Jan-07 5:45
mveDave Kreskowiak16-Jan-07 5:45 
GeneralRe: Listbox name edit Pin
Ultima Reborn16-Jan-07 7:26
Ultima Reborn16-Jan-07 7:26 
GeneralRe: Listbox name edit Pin
Dave Kreskowiak16-Jan-07 7:56
mveDave Kreskowiak16-Jan-07 7:56 
GeneralRe: Listbox name edit Pin
Ultima Reborn16-Jan-07 8:43
Ultima Reborn16-Jan-07 8:43 
GeneralRe: Listbox name edit Pin
Dave Kreskowiak16-Jan-07 9:22
mveDave Kreskowiak16-Jan-07 9:22 
QuestionValidate All controls on form Pin
priya_p23315-Jan-07 23:09
priya_p23315-Jan-07 23:09 
AnswerRe: Validate All controls on form Pin
shreekar16-Jan-07 1:03
shreekar16-Jan-07 1:03 

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.