[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Igor Hudolin

4/9/2002 5:55:00 PM

Can someone give me a hint how to develop application that requires
connection to SQL Server 2000. I just need to get some data from SQL server
to my pocket database and back

Thank you

Igor


2 Answers

Roslyn Lutsch

4/10/2002 9:52:00 PM

0

Hi Igor,

You can always use an ObjectList, List, or SelectionList to display your
data:

1. Create a new mobile project in Visual Studio.NET. I generally use C#.
2. Add an ObjectList to the Form.
3. In the Toolbox, select the Data tab.
4. In the data tab, select sqlDataAdapter. This is a wizard that will prompt
you through the process of connecting to the MS SQL Server that is installed
with VS.NET.

If for some reason your database is not available in the Servers window,
drill down through the hierarchy of the Servers folder until you see the SQL
Servers folder. You can add to the servers by right-clicking SQL Servers and
adding a new database. After the new database is added you can connect to it
through the sqlDataAdapter wizard.

This wizard also adds the sqlConnection1 to your project for you and
configures it.

5. Once you've successfully connected to the sql database, you'll see three
links in the gray section below the Properties window, Configure Data
Adapter, Generate Dataset, and Preview Data. You've just completed
Configiure Data Adapter, now you need to click Generate DataSet. Once that
completes you can click Preview Data to see the data that will appear in
your ObjectList..

6. To modify how your data will appear in the ObjectList, click the control
on the form. Again, below the Properties window you'll see two options:
AutoFormat, and PropertyBuilder. AutoFormat provides you with predesigned
templates that you can you to style data output. The Property Builder lets
you organize and modify how your data appears.

7. The last step is to open the code-behind page to add a line of code to
the Page_Load event. Double-click the Form or MobilePage in the IDE to open
the .aspx file. Scroll to the Page_Load event and add the following two
lines:

sqlDataAdapter1.Fill(dataSet1);

This code is added to a C# project using the default generic names for the
sqlDataAdapter, SqlConnection, and dataSet1.

Hope this helps,
Roslyn Lutsch

"Igor Hudolin" <igor.hudolin@siol.net> wrote in message
news:O8Kd#193BHA.2800@tkmsftngp07...
> Can someone give me a hint how to develop application that requires
> connection to SQL Server 2000. I just need to get some data from SQL
server
> to my pocket database and back
>
> Thank you
>
> Igor
>
>


Roslyn Lutsch

4/10/2002 9:58:00 PM

0

Sorry, in step 7 that's add the following line (you no longer need two
lines, only the one)..

"Roslyn Lutsch" <roznjim@earthlink.net> wrote in message
news:_J0t8.5490$3P4.470819@newsread2.prod.itd.earthlink.net...
> Hi Igor,
>
> You can always use an ObjectList, List, or SelectionList to display your
> data:
>
> 1. Create a new mobile project in Visual Studio.NET. I generally use C#.
> 2. Add an ObjectList to the Form.
> 3. In the Toolbox, select the Data tab.
> 4. In the data tab, select sqlDataAdapter. This is a wizard that will
prompt
> you through the process of connecting to the MS SQL Server that is
installed
> with VS.NET.
>
> If for some reason your database is not available in the Servers window,
> drill down through the hierarchy of the Servers folder until you see the
SQL
> Servers folder. You can add to the servers by right-clicking SQL Servers
and
> adding a new database. After the new database is added you can connect to
it
> through the sqlDataAdapter wizard.
>
> This wizard also adds the sqlConnection1 to your project for you and
> configures it.
>
> 5. Once you've successfully connected to the sql database, you'll see
three
> links in the gray section below the Properties window, Configure Data
> Adapter, Generate Dataset, and Preview Data. You've just completed
> Configiure Data Adapter, now you need to click Generate DataSet. Once that
> completes you can click Preview Data to see the data that will appear in
> your ObjectList..
>
> 6. To modify how your data will appear in the ObjectList, click the
control
> on the form. Again, below the Properties window you'll see two options:
> AutoFormat, and PropertyBuilder. AutoFormat provides you with predesigned
> templates that you can you to style data output. The Property Builder lets
> you organize and modify how your data appears.
>
> 7. The last step is to open the code-behind page to add a line of code to
> the Page_Load event. Double-click the Form or MobilePage in the IDE to
open
> the .aspx file. Scroll to the Page_Load event and add the following two
> lines:
>
> sqlDataAdapter1.Fill(dataSet1);
>
> This code is added to a C# project using the default generic names for the
> sqlDataAdapter, SqlConnection, and dataSet1.
>
> Hope this helps,
> Roslyn Lutsch
>
> "Igor Hudolin" <igor.hudolin@siol.net> wrote in message
> news:O8Kd#193BHA.2800@tkmsftngp07...
> > Can someone give me a hint how to develop application that requires
> > connection to SQL Server 2000. I just need to get some data from SQL
> server
> > to my pocket database and back
> >
> > Thank you
> >
> > Igor
> >
> >
>
>
>