[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

Please Help (Remote data Connection)

Blair Lawrence

1/5/2003 1:50:00 AM

I'm trying to connect remotley to a database. I go through all these steps
and "TEST Connection" and it works just find.
When I press F5 I get the follow when I click the button in the browser. Am
I missing something here?

Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection.

These are the steps I followed:

Objective
After completing this practice, you will be able to create a data form by
using the Data Form Wizard.

Scenario
The Data Form Wizard automatically generates Visual Basic forms that contain
individual bound controls and procedures used to manage information from
database tables and queries. The Wizard can create either single query forms
that manage the data from a single table or a simple query, or it can create
Master/Detail forms that manage more complex one-to-many data relationships.
If using a control, you also can create a grid or datasheet form. The Data
Form Wizard is used in conjunction with only the ADO Data control.

Use the Data Form Wizard to rapidly build forms with controls bound to a
data source; to create single record, grid, and Master/Detail forms; or to
rapidly create prototype data-based forms.

To complete this practice, you need to install SQL Server and restore the
NWTradersTravel database. Restore the database backup files from <Drive
Letter>:\SelfStudy\Practice\SQLDatabase.

a.. NWTRADERSTravel.bak --> NWTradersTravel
Procedure
To restore the NWTradersTravel database

1.. Click Start. Point to Programs, point to Microsoft SQL Server 2000
Server, and click Enterprise Manager.
2.. In the left pane, access the Database folder.
3.. Right-click the Database folder.
4.. Select New Database.
5.. Type the name for the database as NWTradersTravel in the Name text box
and click OK. A database called NWTradersTravel is created.
6.. Right-click NWTradersTravel.
7.. Select All Tasks.
8.. Click Restore Database....
9.. In the General tab, select From Device.
10.. Click Select Devices....
11.. Click Add.
12.. Under the Filename: option button, click the Ellipsis(...) button.
13.. Select the NWTradersTravel.bak file located at <Drive
Letter>:\Practice\SQLDatabase.
14.. Click OK.
15.. Click Options.
16.. Select the Force restore over existing database check box.
17.. Click OK.
18.. Click OK.
19.. Click OK.
To create a new Web project

1.. Open Microsoft Visual Studio.NET.
2.. On the File menu, point to New, and then click Project.
3.. In the New Project dialog box, do the following:
1.. In the Project Types pane, select Visual Basic Projects.
2.. In the Templates pane, select ASP.NET Web Application.
3.. In the Name box, type WebApplication2 as the name of your project,
accept the default location (http://localhost), and click OK.
To create a data form by using the Data Form Wizard

1.. On the File menu, click Add New Item.
The Add New Item dialog box displays.

2.. Expand the Web Project Items node in the Categories pane.
3.. Click Data Form Wizard in the Templates pane.
4.. Notice that the default name of the data form is DataWebForm1.aspx. To
accept the default name, click Open.
The Data Form Wizard Welcome screen displays.

5.. Click Next.
6.. Type NorthWind as name for the DataSet in the Create a new dataset
named box, and then click Next.
7.. Choose a connection from the list of connections displayed and click
Next, or click New Connection to create a new connection.
1.. If you click New Connection, the Data Link Properties dialog box
displays.
2.. Click the Provider tab.
3.. Click Microsoft OLE DB Provider for SQL Server from the list of
providers displayed and click Next.
4.. Select your computer name from Select or enter a server name
drop-down list.
5.. Select Use Windows NT Integrated security.
6.. Click Select the database on the server option, and select the
NWTradersTravel database from the drop-down list.
7.. Click Test Connection.
8.. Click OK to return to the Choose a data connection screen of the
Data Form Wizard. Click Next.
8.. Choose a single table or view you want to add to your data form by
selecting it from the list of available items and clicking the > button.
The table or view appears in the Selected items list.

9.. Click Next.
10.. Choose the tables and columns you want displayed on the form, and
click Finish.
You can select a column to appear on the data form by checking the column
in the list of columns displayed.

11.. Set the data form as the startup page for the project, and run the
project. To do so, follow these steps:
1.. In the Solution Explorer window, right-click the file
DataWebFrom1.aspx.
2.. Click Set as Start Page.
3.. Press F5 to run the project.
Internet Explorer displays the data form.








begin 666 tribull.gif
M1TE&.#EA#@`2`,0``#-:R?____[^_OS\_/O[^_CX^/?W]_;V]O7U]?/S\_#P
M\._O[^OKZ^?GY^+BXN'AX=[>WMG9V=;6ULO+R\K*RLG)R;Z^OKV]O;2TM*ZN
MKJBHJ*:FIIR<G)N;FP```````"P`````#@`2```%7* `$(,0G"A*`$!2F"EJ
ML #SQB="UW><[#P8Z@>T"0/$8@\)9$46A&$S0VD4I#L.U8IE=3269_24_%XD
C1NQ&<TY++9CV,N>85-#SDX$!>;AC! <*+D<I`@,DA2DA`#L`
`
end