473,770 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1007
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***@sgc0nsul tants.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.DataBaseConne ction = ...
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
3631
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 different ways and can't get it to work. I can get it to work with VBScript, but I need to do this project in JavaScript. HELP- PLEASE!? <%@Language=JavaScript%> <%Response.buffer=true%> <%
5
1641
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
2644
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 < b simply means that b < a can't be set, also it must be a != b. >And with three objects a < b , b < c means a < c > >I studied Quick Union Find algorithms a bit and if I understood them >correctly, once the user gives the input setting the...
1
1404
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 defined as: typedef void (__stdcall *COMPILE_ERROR_CALLBACK)(int Line, char* Text, void* Data);
2
2711
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 button, seems simple. I am using ALL visual controls (supposedly to simplify things. If I was not using the visual controls and calling an ExecuteNonQuery no prob. Please look at my code and tell me what I am doing wrong. Also, what are the advatages...
3
1702
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 calling the same method same way except for creating object instead directly calling the method? i get this when trying to do that:- ************************************************** Response is not available in this context. Description: An...
0
2067
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 kind of integration: when I modify a source file in VisualStudio, VS found out it's readonly and controled by VSS, then pop up a dialog for me to check out from VSS. It seems like even with TFS, the integration between VSS and VS is not the same....
10
1799
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
2195
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 problems later). Apparently Point is a struct, a value type, and it does not behave like a classic structure (in my mind's eye, and see below). Traditionally I think of a classic structure as simply an object where every member is public. But with...
0
1113
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 (btnAdd, btnSave) Table(dtCustomers) contains three rows, with customer name "a", "b" and "c". Now I press "btnAdd" button to add a new row. Then I type "d" as name and "123" ad phone number.
0
9617
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9453
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10254
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10099
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8929
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3607
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.