473,326 Members | 2,048 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,326 software developers and data experts.

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

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 2938
bartonc
6,596 Expert 4TB
  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
markmcgookin
648 Expert 512MB
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\DeviceApplication1\Northwind.sdf";

sqlConnectionString Conn = new sqlConnectionString(conString);

Conn.Open();

then you could query the database

String queryStr = "Select * from Customers";

etc


Here is another place to get some information

http://technet.microsoft.com/en-gb/library/ms173037.aspx
Nov 2 '07 #3
Plater
7,872 Expert 4TB
We have an article about connecting to databases:
http://www.thescripts.com/forum/thread635615.html
Nov 2 '07 #4
@twister246in
C#

sqlcommand cmd=new sqlcommand(select name, empid from tablename);
con.open();
dataset ds=new dataset();
sqldataadapter da=new sqldataadapter(cmd);
da.fill(ds);
datagrid.datasource=ds.table(0);
con.close();
Jan 21 '12 #5

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

Similar topics

0
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...
0
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...
0
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....
4
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,...
10
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...
5
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...
2
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...
4
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...
53
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.