Link to home
Start Free TrialLog in
Avatar of peers
peers

asked on

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,
Peers
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

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.

CHeers
Avatar of chops123
chops123

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.

KC
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.

KC
Avatar of peers

ASKER

hi,
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..
Peers
ASKER CERTIFIED SOLUTION
Avatar of chops123
chops123

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Knock ! Knock ! .. u there  ??
Avatar of peers

ASKER

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.
peers
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

SpideyMod
Community Support Moderator @Experts Exchange