473,412 Members | 4,594 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,412 software developers and data experts.

Dataset,reference, parameters?

Hello,
Iam newbie, I want to ask some basic question. I come from Delphi world. In
Delphi I have DataModule where i put down all coonnection, datasets and
so...Is it posible and how can i do that in C#, I create new form and put on
sql Connection, datadapters and create datasets, so how can i now use this
datasets in other forms, i cannot find any examples on internet. also i
donn't know how to call some function in other forms, in delphi i call like
form2.DoSomething; how to do this in c#, please could somebody write few
line of code how to do this.

thanks
Nov 15 '05 #1
2 1988
Hi Matej,

You can't share them within designer.
You'll have to pass references to another form.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Matej Kavčič" <ma**********@email.si> wrote in message
news:O1**************@TK2MSFTNGP11.phx.gbl...
Hello,
Iam newbie, I want to ask some basic question. I come from Delphi world. In Delphi I have DataModule where i put down all coonnection, datasets and
so...Is it posible and how can i do that in C#, I create new form and put on sql Connection, datadapters and create datasets, so how can i now use this
datasets in other forms, i cannot find any examples on internet. also i
donn't know how to call some function in other forms, in delphi i call like form2.DoSomething; how to do this in c#, please could somebody write few
line of code how to do this.

thanks

Nov 15 '05 #2
Matej,
Normally what I do is to add a new Component (Project Add Component) to my
project, the put all the connection, adapters, commands and so on this new
component. I then add methods to the component to "simplify" the interface,
for example I may have a single Fill method that invokes Fill on all the
contained adapters...

Then from my Forms I can reference this component & use the part I need.

Note if you add the component to your form, each form will get a new
instance, its may be "better" to implement the Component as a singleton and
manually invoke the methods.

Using a Component gives you a visual designer without the overhead of an
actual form.

Hope this helps
Jay

"Matej Kavčič" <ma**********@email.si> wrote in message
news:O1**************@TK2MSFTNGP11.phx.gbl...
Hello,
Iam newbie, I want to ask some basic question. I come from Delphi world. In Delphi I have DataModule where i put down all coonnection, datasets and
so...Is it posible and how can i do that in C#, I create new form and put on sql Connection, datadapters and create datasets, so how can i now use this
datasets in other forms, i cannot find any examples on internet. also i
donn't know how to call some function in other forms, in delphi i call like form2.DoSomething; how to do this in c#, please could somebody write few
line of code how to do this.

thanks

Nov 15 '05 #3

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

Similar topics

5
by: Christian Ahrenkiel | last post by:
Hi, I've got a DataSet (ds) which was created by a DataAdapter (da) method: ds.Fill(ds). This DataSet is passed through various methods (by value). Each method changes some fields in the...
3
by: JJ | last post by:
Hi, I need to pass a dataset to another win form along with a SqldataAdapter. I don't want to recreate the SqlDataAdapter again either. So to pass to another Win form in my windows form app, do...
3
by: Jason L James | last post by:
Hi all, I recently wrote a vb.net app using oledb to an access database. When I inserted new rows in my datatable the identity column was automatically created. This app used an un-typed...
3
by: Gene Vangampelaere | last post by:
Hi, I'm having a frustrating problem :) I have an XML like this : <?xml version="1.0" encoding="utf-8"?> <cgb> <parameters> <parameter> <paramName>patientNr</paramName>
4
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Why am I getting an error when I passed by ref a dataset to a new form? The message reads "cannot convert from 'ref Paimport.unixAccount' to 'ref System.Data.DataSet'. Paimport is the name of the...
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
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,...
0
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...
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...

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.