473,409 Members | 1,935 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

I think Im doing it all wrong - Please Help

Hi Group,

I have a project which has a access database with it. I`ve added the
Database Adapter And Database connected to each of my forms, generated a
Dataset, and added the relivant table from the Database into it.

Is this right or should i only add my Database Adapter and Connector once to
my project?

Ta
Si
Nov 20 '05 #1
7 999
Cor
Hi Newbie,

It depends totaly how you use it.
There is for this as for most things in VB.net not an best answer how to do.

But working with 2 totaly seperated forms is for a newbie mostly a problem.

My advice is to try it first with one and some dialogforms or use the MDI
forms

But did you see the VB.net resource kit, there are a lot of samples there.

http://msdn.microsoft.com/vbasic/vbrkit/default.aspx

And if you have problems installing it

http://msdn.microsoft.com/vbasic/vbr...q/#installvdir

I hope this helps a little bit?

Cor

I have a project which has a access database with it. I`ve added the
Database Adapter And Database connected to each of my forms, generated a
Dataset, and added the relivant table from the Database into it.

Is this right or should i only add my Database Adapter and Connector once to my project?

Nov 20 '05 #2
* "Newbie!" <s_************@yahoo.co.uk> scripsit:
I have a project which has a access database with it. I`ve added the
Database Adapter And Database connected to each of my forms, generated a
Dataset, and added the relivant table from the Database into it.

Is this right or should i only add my Database Adapter and Connector once to
my project?


One connection to the same database should be enough in most scenarios.
Are you using databound controls?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
yer have about 10 forms all looking at differnent table

whwre would i declare on database connection so that all form could share
it?

Regards
Si

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:br************@ID-208219.news.uni-berlin.de...
* "Newbie!" <s_************@yahoo.co.uk> scripsit:
I have a project which has a access database with it. I`ve added the
Database Adapter And Database connected to each of my forms, generated a
Dataset, and added the relivant table from the Database into it.

Is this right or should i only add my Database Adapter and Connector once to my project?


One connection to the same database should be enough in most scenarios.
Are you using databound controls?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.550 / Virus Database: 342 - Release Date: 09/12/2003
Nov 20 '05 #4
Cor
Herfried,

One connection to the same database should be enough in most scenarios.
Are you using databound controls?


As far as I know only for datasets, the OP is talking about that, but I
thought it would be right to point your attention on that.

Cor
Nov 20 '05 #5
* "Newbie!" <d0***@sgc0nsultants.kar00.c0.uk> scripsit:
whwre would i declare on database connection so that all form could share
it?

You can create the connection for example in a 'Sub Main':

\\\
Public Module AppMain
Public Sub Main()

' Create connection here.
Dim f As New MainForm()
f.DataBaseConnection = ...
Application.Run(f)
End Sub
End Module
///

In the project properties, select 'Sub Main' as "startup object".

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #6
Cor
Hi Newbie,

The wizard method gives problems as you are making more and more complex
connections.

But for the first time it is ok.

There is also no problem if you make for every form a new connection.

But you will see going on, that that wizards gives you on a certain moment
more work than that it helps you.

My thought was that you did want to spread the data from one database with
one connection over two forms in the same time. Absolute posible but with
the wizard a little bit much work.

That is all,

Cor
Nov 20 '05 #7
* "Cor" <no*@non.com> scripsit:
One connection to the same database should be enough in most scenarios.
Are you using databound controls?


As far as I know only for datasets, the OP is talking about that, but I
thought it would be right to point your attention on that.


I was not sure when replying if the OP is referring to the connection to
the database, but IMO that's an important point too.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: What-a-Tool | last post by:
I'm going out out of my mind trying to get this to work with no luck. The error message I get is at the bottom. Can someone please tell me what I'm doing wrong here. I've tried this a million...
5
by: Stephan Gehrlein | last post by:
What do I have to do to get help from other newsgroup members? Whenever I try to get help from the NG I never get results... If I do something wrong, please tell me about it! Stephan
1
by: aredo3604gif | last post by:
On Sun, 10 Apr 2005 19:46:32 GMT, aredo3604gif@yahoo.com wrote: >The user can dynamically enter and change the rule connection between >objects. The rule is a "<" and so given two objects: >a <...
1
by: Pepa Cougar | last post by:
Hello, I'm writing a managed C++ wrapper for a legacy C++ code. I'm wrapping a script-compiler class, which uses a callback to report script errors back to the client. The callback prototype is...
2
by: Aaron Ackerman | last post by:
I cannot a row to this bound DataGrid to SAVE MY LIFE! I have tried everything and I am at a loss. The using goes into add mode with the add button adds his data then updates with the update...
3
by: Farooq Khan | last post by:
why does Response.Write in a method of code-beind class when called from inpage code (i.e in <%---%>), after creating object of that class, fails when called while it works perfectly ok while...
0
by: orientphoebus | last post by:
I tried the new Visual Studio 2005 Team System + VSS2005, no Team Foundation Server. Some questions pop into my head: 1. WITHOUT TFS, can VSS2005 integrated with VS2005? What I like is the VS6...
10
by: DavidSeck.com | last post by:
Hi, I am working with the Facebook API right now, an I have kind of a problem, but I don't know what I am doing wrong. So I have a few arrays, f.ex.: User albums: array(2) {
0
by: raylopez99 | last post by:
I ran afoul of this Compiler error CS1612 recently, when trying to modify a Point, which I had made have a property. It's pointless to do this (initially it will compile, but you'll run into...
0
by: Pat | last post by:
Hi Guys, Please help me. I am having a strange issue. Not sure if I am doing something wrong or this is a bug. This is a sample code. This contains 2 text boxes(txtName, txtPhone) and 2 buttons...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.