Click here to Skip to main content
15,915,065 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Index number starting point HELL! Pin
Richard Deeming5-Dec-02 1:03
mveRichard Deeming5-Dec-02 1:03 
Generaldata caching Pin
brieg10004-Dec-02 10:02
brieg10004-Dec-02 10:02 
GeneralRe: data caching Pin
Nick Seng4-Dec-02 15:05
Nick Seng4-Dec-02 15:05 
GeneralRe: data caching Pin
brieg10005-Dec-02 2:41
brieg10005-Dec-02 2:41 
GeneralODBC with Access 2000 Pin
-- NA --3-Dec-02 8:14
-- NA --3-Dec-02 8:14 
GeneralRe: ODBC with Access 2000 Pin
Daniel Turini3-Dec-02 8:27
Daniel Turini3-Dec-02 8:27 
GeneralVB.Net decreased speed Pin
Supermaniac3-Dec-02 2:45
Supermaniac3-Dec-02 2:45 
GeneralRe: VB.Net decreased speed Pin
mikasa10-Dec-02 4:49
mikasa10-Dec-02 4:49 
Sure, you need to redesign everything! First, you should start by creating simple DataAccess components. I like to do this in a standalone DLL which I can use for all my Projects.

Within the DLL, I have a public Class call "DataSource". I encapsulate ALL Connection information here and make it super simple to use. For example, "DataSource.Connect", "DataSource.DisConnect" and all error handling is done within the Class.

Now, within my "Central" project, I create 1 Public Variable (or Shared Variable in VB.NET) and place it either inside a Globals Module (in VB6) or within the MDIForm (in VB.NET as a Shared Variable). Doing this allows all my Forms to use 1 Connection link into the Database.

I will Post next the DataSource Class which I use. It is very simple to use, here's an Example:

'Initialize the Application
MainMDI.DataSource = New ActiveDataObjects.DataSource()
With MainMDI.DataSource
.DatabaseType = ActiveDataObjects.DataSource.DatabaseTypes.dbSQLServer
.Server = "(Local)"
.Database = "MyDatabase"
.UserID = "UserID"
.Password = "password"
End With

The DataSource automatically knows when to initialize a Connection if one doesn't already exist, and it knows how to Connect / DisConnect using the Proper IDBConnection Object optimized for the "DatabaseType" specified. I have Connection strings implemented for almost all DBTypes, but more can be simply Implemented by editing the DatabaseType enum and modifiying the Code (look for ConnectionStrings on www.connectionstrings.com).
GeneralRe: VB.Net decreased speed Pin
mikasa10-Dec-02 4:50
mikasa10-Dec-02 4:50 
GeneralRe: VB.Net decreased speed Pin
mikasa10-Dec-02 4:57
mikasa10-Dec-02 4:57 
QuestionVB6: Call a java method from VB project?!?!!? Possible or not? Pin
gicio2-Dec-02 7:49
gicio2-Dec-02 7:49 
AnswerRe: VB6: Call a java method from VB project?!?!!? Possible or not? Pin
Daniel Turini2-Dec-02 8:40
Daniel Turini2-Dec-02 8:40 
AnswerRe: VB6: Call a java method from VB project?!?!!? Possible or not? Pin
Nick Parker2-Dec-02 8:48
protectorNick Parker2-Dec-02 8:48 
GeneralRe: VB6: Call a java method from VB project?!?!!? Possible or not? Pin
Daniel Turini3-Dec-02 3:48
Daniel Turini3-Dec-02 3:48 
GeneralRe: VB6: Call a java method from VB project?!?!!? Possible or not? Pin
Nick Parker3-Dec-02 8:03
protectorNick Parker3-Dec-02 8:03 
GeneralGame Pin
Andy H2-Dec-02 6:38
Andy H2-Dec-02 6:38 
GeneralRe: Game Pin
Nick Seng2-Dec-02 14:16
Nick Seng2-Dec-02 14:16 
GeneralRe: Game Pin
David Brooks19-Dec-02 10:28
David Brooks19-Dec-02 10:28 
Questionmenu enable/disable problem....?? Pin
drmzunlimited30-Nov-02 19:51
drmzunlimited30-Nov-02 19:51 
AnswerRe: menu enable/disable problem....?? Pin
mikasa1-Dec-02 2:47
mikasa1-Dec-02 2:47 
GeneralCustom Property Editor in VB.NET Pin
mikasa30-Nov-02 9:44
mikasa30-Nov-02 9:44 
GeneralRe: Custom Property Editor in VB.NET Pin
FruitBatInShades2-Dec-02 12:09
FruitBatInShades2-Dec-02 12:09 
GeneralDispatchWrapper gives error Pin
Uday Bhaskar29-Nov-02 18:34
Uday Bhaskar29-Nov-02 18:34 
GeneralSelecting all the Items in Checked List Box Pin
Sameers (theAngrycodeR )28-Nov-02 11:56
Sameers (theAngrycodeR )28-Nov-02 11:56 
GeneralRe: Selecting all the Items in Checked List Box Pin
Richard Deeming2-Dec-02 5:40
mveRichard Deeming2-Dec-02 5:40 

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.