Hello: I have an existing windows .net application that has an access database as the backend.
I want to place the access database on a web server and it was suggested that I create a web service in order to communicate with the database.
I've been looking at some tutorials but am still confused about the basic config needed. Here's some questions I have:
1) Does the web service need to be created inside my current project by right clicking on the solution and choosing to add a new web site...and then selecting web service?
2) If it's set up like this, what files do I place onto the web server?
3) Where does the database reside? Do I need to place the database inside the web server that I create?
4) My current project has existing sql that gets data and I'm uncertain how to re-write in order to retreive the data. e.g. which part goes into the client and which part goes to web service pages? here's an example of a procedure that currently exists...I'm getting data to populate a dropdown:
I appreciate any help you can give. As you can see, I'm really lost right now.Code:Public Sub PopulateCustomers() Dim myDB As New OleDb.OleDbConnection(sConnectionString) Dim myDS As New Data.DataSet Dim myDA As New OleDb.OleDbDataAdapter myDA = New OleDb.OleDbDataAdapter("select custid, name from tblCustomer order by name", myDB) Try myDA.Fill(myDS, "tblCustomer") With cboCustomer .DataSource = myDS.Tables("tblCustomer") .DisplayMember = "Name" .ValueMember = "CustID" If bGotCustId = True Then 'if user just did a save and they are passing back the custid, need to set the selected value to that .SelectedValue = txtCustID.Text.ToString() End If If bSetCustomer = True Then 'is the user returning from another screen? we need to return to the same customer. If nCustomerId > 0 Then .SelectedValue = nCustomerId bSetCustomer = False 'reset End If End If End With myDB.Close() cboCustomer.SelectedItem = 1 txtCustID.Text = cboCustomer.SelectedValue Catch MsgBox("An error occurred while in: PopulateCustomers") End Try End Sub
Thanks,
Proctor




Reply With Quote