Hi,
My project is .Net 1.1 C# Windows Form project, and the database server is
SQL Server 2000.
In one of the database's datatable MyTable, the Primary Key is a Join Key
[Name, Number].
Now in my C# Windows form MyForm, it is designed mainly for manipulating the
datatable MyTable.
I am thinking if we apply the OO concept, do we need to have public function
like:
public string[,] GetMyTable(string aName,string aNumber)
Since I am thinking the [Name, Number] will indicate a unique row in the
MyTable in SQL Server.
Also, do I need to build a contsructor for pass value [Name, Number] for
other forms?
Thanks for help.
Jason 2 1219
First of all, why don't u use single primary key instead of using Join
Key (according term u used). U can create it manually or
uniqueidentifier with default value - newid()
Secondly, u can use DataSet or DataTable object when u need pass data
to other forms by overloading constructor or using property.
Hope that help u
Jason Huang wrote: Hi,
My project is .Net 1.1 C# Windows Form project, and the database server is SQL Server 2000. In one of the database's datatable MyTable, the Primary Key is a Join Key [Name, Number]. Now in my C# Windows form MyForm, it is designed mainly for manipulating the datatable MyTable. I am thinking if we apply the OO concept, do we need to have public function like:
public string[,] GetMyTable(string aName,string aNumber)
Since I am thinking the [Name, Number] will indicate a unique row in the MyTable in SQL Server. Also, do I need to build a contsructor for pass value [Name, Number] for other forms? Thanks for help.
If you REALLY want to practice good OO, you would use some kind of Data
Access Object pattern. There is was a good couple of articles posted to
code project about this recently. http://www.codeproject.com/dotnet/ADONETOOP.asp http://www.codeproject.com/dotnet/AdoNetForOopPart2.asp
It may seem overly complicated at first, but with a reasonably small
amount of code, you can have a true OO model which happens to have a
database underneath.
--
Jay R. Wren This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: nop90 |
last post by:
Proof of concept: Currently I have a web hosting service and it does
support php.
Can the following be done in php? Explanations or examples would be
appreciated.
Create 2 applications, app-1...
|
by: Dick |
last post by:
Before going in to details i like to understand more about concept and
design of this database. Most books go directly in to details.
Please, can a current admistrator gife me information on...
|
by: strutsng |
last post by:
I want to clarify the concept of submitting the form to the web server.
PHP is just an example here, it applies to any web programming
languages.
On page1.php,
<form name="myform"...
|
by: srinivas |
last post by:
Hi,
I am a asp programmer.I am displaying the db records in the
html pages in a web page.I have 500 columns and 1000 rows in that html
table.Here i am planning to implement the "MS-Excel Freeze...
|
by: Howard |
last post by:
I need to write a web page that outputs a table from database. ( i want to
write my own code, don't want to use the built-in control)
I came up with two ways of doing this (i use c# 2.0)
1....
|
by: sj |
last post by:
I need to write an application to perform Quotations, and confrimed
Quotations information can later extracted and print a Delivery Order,
and finally an Invoice. Note that, ammendments maybe made...
|
by: John |
last post by:
AJAX is a rich client-side technology that makes the web pages more
interactive. In practice, the same AJAX client-side code should be
unchanged, regardless of what server-side web technologies we...
|
by: Raj |
last post by:
Hi All..,
I have a VB.Net Windows Application..
I need to Run this Exe From Some Other System(Client) and I need to
Upload some specified files to the Server System..
Now my doubts are..
...
|
by: suganthy |
last post by:
Hi,
Can any one tell the merits and demerits of table concept in integrating a html layout when compared with DIV concept
Thanks
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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...
|
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...
|
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,...
| |