Click here to Skip to main content
15,880,967 members
Home / Discussions / Database
   

Database

 
QuestionHow to access *.dbf file using c# Pin
Kumaran Jeyasingam4-Dec-08 14:32
Kumaran Jeyasingam4-Dec-08 14:32 
AnswerRe: How to access *.dbf file using c# Pin
PIEBALDconsult4-Dec-08 15:33
mvePIEBALDconsult4-Dec-08 15:33 
AnswerRe: How to access *.dbf file using c# Pin
Mycroft Holmes4-Dec-08 21:45
professionalMycroft Holmes4-Dec-08 21:45 
GeneralRe: How to access *.dbf file using c# Pin
Wendelius5-Dec-08 8:24
mentorWendelius5-Dec-08 8:24 
GeneralRe: How to access *.dbf file using c# Pin
Mycroft Holmes5-Dec-08 14:07
professionalMycroft Holmes5-Dec-08 14:07 
GeneralRe: How to access *.dbf file using c# Pin
Kumaran Jeyasingam14-Dec-08 14:58
Kumaran Jeyasingam14-Dec-08 14:58 
QuestionProgram Design - Master DataSet/Adapter for program? Pin
David Hovey4-Dec-08 8:53
David Hovey4-Dec-08 8:53 
AnswerRe: Program Design - Master DataSet/Adapter for program? Pin
Wendelius4-Dec-08 9:25
mentorWendelius4-Dec-08 9:25 
I think your post would have been better off in Design and Architecture forum, but anyway.

David Hovey wrote:
when the user clicks "OK" on whichever dialog, the program will commit the new data to the database


Just a note: Take care that database operations are done transactionally and no user interference is allowed while transaction is running.

David Hovey wrote:
Do you think these objects should be created with each form


Forms and data (and logic) should be separated so that you can modify each (almost) independently. Get to know for example MVC (Model-View-Controller) concept.

David Hovey wrote:
When I need to run a query involving two tables using OleDbCommand it seems I have to use an adapter which then reads the database on disk


I don't see any reason why you should store the results to a disk. You use joins in the SQL statement.

David Hovey wrote:
But anything more complex I now need to create a new DataAdapter and DbCommand objects


That would be logical in many cases, although you can reuse the command if you change the command text.

David Hovey wrote:
Would it be reasonable to have one OleDbConnection object for application


You should get and open the connection to the database when you need to operate with it. After executing the statements, you close the connection. Also use connection pooling.

David Hovey wrote:
Then mutiple OleDbAdapter objects for each form


Again, separate forms and database operations. For example if you someday want to run the logic on a middle-tier and only the UI on client (or web page) it greately helps you if you have a good and logical layering in your code.

David Hovey wrote:
I would also have a OleDbCommandBuilder in each form to allow for the Update method when user wants to commit data.


Same as previous, but note what I wrote in the beginning about transactions and user interference.

Hope this helps you forward,

Mika

The need to optimize rises from a bad design.My articles[^]

GeneralRe: Program Design - Master DataSet/Adapter for program? Pin
David Hovey4-Dec-08 10:56
David Hovey4-Dec-08 10:56 
GeneralRe: Program Design - Master DataSet/Adapter for program? Pin
Wendelius5-Dec-08 7:50
mentorWendelius5-Dec-08 7:50 
QuestionDatabase Problem Pin
sajjadlashari3-Dec-08 22:50
sajjadlashari3-Dec-08 22:50 
AnswerRe: Database Problem Pin
J4amieC3-Dec-08 23:08
J4amieC3-Dec-08 23:08 
AnswerRe: Database Problem Pin
Wendelius4-Dec-08 7:40
mentorWendelius4-Dec-08 7:40 
QuestionNot able to see the Access database structure behind the form Pin
Brendan Vogt3-Dec-08 22:37
Brendan Vogt3-Dec-08 22:37 
AnswerRe: Not able to see the Access database structure behind the form Pin
ChandraRam4-Dec-08 1:59
ChandraRam4-Dec-08 1:59 
AnswerRe: Not able to see the Access database structure behind the form Pin
Jerry Hammond4-Dec-08 6:36
Jerry Hammond4-Dec-08 6:36 
Questionproblem creating database role... Pin
rajkumar.33-Dec-08 22:33
rajkumar.33-Dec-08 22:33 
AnswerRe: problem creating database role... Pin
Wendelius4-Dec-08 3:54
mentorWendelius4-Dec-08 3:54 
QuestionTime out only the first time Pin
samerh3-Dec-08 21:02
samerh3-Dec-08 21:02 
AnswerRe: Time out only the first time Pin
Wendelius4-Dec-08 4:03
mentorWendelius4-Dec-08 4:03 
QuestionNeed to execute a query when postgres service starts Pin
krishnan.s3-Dec-08 20:45
krishnan.s3-Dec-08 20:45 
AnswerRe: Need to execute a query when postgres service starts Pin
Wendelius4-Dec-08 7:06
mentorWendelius4-Dec-08 7:06 
QuestionTo apply a search on every table in a database Pin
rahuladya3-Dec-08 19:49
rahuladya3-Dec-08 19:49 
AnswerRe: To apply a search on every table in a database Pin
Ashfield3-Dec-08 21:09
Ashfield3-Dec-08 21:09 
GeneralRe: To apply a search on every table in a database Pin
rahuladya4-Dec-08 6:29
rahuladya4-Dec-08 6:29 

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.