473,729 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help needed for windows mobile application development( C# . Net )

1 New Member
hi there, i am new to developing in C# .Net... can any one tell me how to establish a connection between the application developed and the database . i have designed a registration form which has 2 fields - name and employee id.

1.how do u establish a connection between the form and the database.

2.And how to display the database in the data grid placed in the form
Oct 31 '07 #1
4 2959
6,596 Recognized Expert Expert
  1. Please post in the Forum and not the Articles section
  2. This may be more of a general question for the .NET Forum

And please take some time to read our Posting Guidelines. Thanks.
Oct 31 '07 #2
648 Recognized Expert Contributor
hi there, i am new to developing in C# .Net... can any one tell me how to establish a connection between the application developed and the database . i have designed a registration form which has 2 fields - name and employee id.

1.how do u establish a connection between the form and the database.

2.And how to display the database in the data grid placed in the form
Hi there,
You need to add your database to your project
you need to create a new connection string
then you need to connect to the database
then assign the datasource of the datagrid to your datasource

this is a great place to get started

http://msdn2.microsoft .com/en-gb/windowsmobile/default.aspx

You connectin string will probably be something like

sting conString = @"\Program Files\DeviceApp lication1\North wind.sdf";

sqlConnectionSt ring Conn = new sqlConnectionSt ring(conString) ;


then you could query the database

String queryStr = "Select * from Customers";


Here is another place to get some information

http://technet.microso ft.com/en-gb/library/ms173037.aspx
Nov 2 '07 #3
7,872 Recognized Expert Expert
We have an article about connecting to databases:
Nov 2 '07 #4
1 New Member

sqlcommand cmd=new sqlcommand(sele ct name, empid from tablename);
dataset ds=new dataset();
sqldataadapter da=new sqldataadapter( cmd);
datagrid.dataso urce=ds.table(0 );
Jan 21 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Zorba.GR | last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64 bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager Express Edition v1.3.2 Win, IBM Tivoli System Automation v1.2.0 Linux, IBM Tivoli Workload Scheduler Virtualized Data Centers v8.2 , other IBM Tivoli CDs, WEBSPHERE EVERYPLACE MOBILE PORTAL v5.0 - ALTIUM , other IBM WebSphere Business CDs...
by: Nick White [MSFT] | last post by:
Hello fellow Microsoft Windows Mobile and Embedded enthusiasts: I invite you to peruse the list below of upcoming technical chats and Webcasts offered by the Windows Mobile and Embedded Devices Group. For the full list of upcoming Windows Mobile and Embedded chats, to review archived chat sessions, or to request a reminder for a chat, visit http://msdn.microsoft.com/embedded/community/community/chats/. Also, the Windows Mobile and...
by: Jie | last post by:
Does anyone know why I keep having the following error. I have to rebuild the solution every time I run it in design mode. thanks jie Server Error in '/ReapPortal' Application. ---------------------------------------------------------------------------- ---- Compilation Error
by: MPA | last post by:
Hi, We are a small company with experience in client-server apps with PowerBuilder and most major databases. We have no internet experience. We are now looking into slimming our main application, rewriting it with DOT.NET and making it accessible for Internet browsers. Our app constists of hierarchical tree (with usually several hundred nodes) representing the company structures of our customers with several tabs with corresponding info...
by: Ben | last post by:
This is not a troll post. I am doing research on my own too but could use your guys/gals help. As mentioned in prev thread our company is about to embark on building a large scale web based application. "Shimmy" provided some help already but need more. This app will be hit by thousands of users, large data sets and be fed by GPS handheld devices such as cell phones, which will also require apps we write running on them. The response...
by: cmrhema | last post by:
Hello, This is my first letter in Mobile development section. we are supposed to develop mobile application a software that will be downloaded on mobile and can be used therein. Now can we develop that in .net. And what would be requirements for the same. Regards cmrhema
by: Amit Agarwal | last post by:
Hi guys...I'm new to mobile development and need your help. I'm trying to make a application that can detect the applications installed on mobile devices. Now I think there are two ways to achieve this: 1) Create a mobile application that can detect the other installed applications. 2) Create a windows/linux application that will first detect the connected phone and then detect the installed applications. Now I think that 1st method...
by: libish | last post by:
hi all.. i'm new in windows mobile application development... my question is .. will an application developed for windows mobile 5 work in windows mobile 6 i'm not developing an high end application... what my application will be doing is that , it requests server and accepts response etc... its a c#.net application can any one clear my doubts.
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script language="javascript" type="text/javascript">
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...
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,...
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...
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...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.