VB -Client Server to Web server Data transfer

Hi all,
This is a very challenging thing i have come accross now.
I Have a Client server application in VB.This has  a form with say 10 data input fields.When i press the
"save" button the data from the form gets saved in the sql server in my local network.

Now what i want is when i press the "save" Button the data has to be saved in the database in the Web-Server(any one-IIS...) as well as on the local network.
Could anyone of you guys out there can let me knwo how i can achieve this.
thankx in advance to all,
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

chops123Connect With a Mentor Commented:

In your VB code... you could do something like this

Inet1.OpenURL ""

Do While Inet1.StillExecuting

If Inet1.ResponseCode <> 0 Then
    MsgBox Inet1.ResponseInfo
End If


Your ASP page "updateDB.asp" can contain the insert statement.


Guy Hengel [angelIII / a3]Billing EngineerCommented:
If there is a SQL Server on a Web Server (i assume it is installed...), you simply connect to your local server and after that update to the web server using the IP Address of that server (even the name should work).

I guess that you would like to have both servers ensured to have the same update, so if 1 update fails, none of the servers should be updated.

For these situations, you either
* use distributed transactions (the client application knows of the different servers to update)
* use MTS server (1 interface for the client application, the MTS component needs to update the servers)
* use replication (client updates only 1 server, replication does the rest)

I think you might think and learn about these things before you decide which strategy to follow.

There is another good,reliable and simple way of doing it.

Have an ASP page located on your web server that contains the code to insert/update the table on your remote IIS Server.

In your VB program,before inserting in the local database,run the ASP page using winsock or inet control.

On successful execution of the ASP page.. only then insert/update the contents in your local database.

Angell.. I dont think replication is a good solution especially when updating remote servers since it depends a lot on the net connectivity and is not reliable for remote updates.

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

To add.. I have been using this technique in a cramped bandwidth environment for the last 3 years and it seems to work very well.

peersAuthor Commented:
KC-I guess your idea will work out in my case.
The execution of the ASP page should be hidden.i.e when the user saves he should not be knowing a ASP page is also beign submitting simultaneouly.May be that is what you try to say when asking to use socket programming.
Is it possible for you to give me a small sample code so that i could try out this concept since you have beign using this for 3 years.
thankx to all ..keep writing..
Knock ! Knock ! .. u there  ??
peersAuthor Commented:
hi Kc,
Sorry was not well for some.
i am trying out this code what you have given.will rite here the resullt at the earliest.Thankx a lot for everyone for the response.Keep writing guy if you get any new idea.
Hi peers,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept chops123's comment(s) as an answer.

peers, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
DanRollins -- EE database cleanup volunteer
per recommendation

Community Support Moderator @Experts Exchange
All Courses

From novice to tech pro — start learning today.