Solved

VB -Client Server to Web server Data transfer

Posted on 2002-07-02
9
189 Views
Last Modified: 2013-11-13
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
0
Comment
Question by:peers
9 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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
0
 
LVL 2

Expert Comment

by:chops123
Comment Utility
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
0
 
LVL 2

Expert Comment

by:chops123
Comment Utility
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
0
 

Author Comment

by:peers
Comment Utility
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
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Accepted Solution

by:
chops123 earned 200 total points
Comment Utility

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

Inet1.OpenURL "http://10.10.17.135/myfolder/updateDb.asp"

Do While Inet1.StillExecuting
     DoEvents
Loop

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

Inet1.Cancel

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

KC


0
 
LVL 2

Expert Comment

by:chops123
Comment Utility
Knock ! Knock ! .. u there  ??
0
 

Author Comment

by:peers
Comment Utility
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
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
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
0
 

Expert Comment

by:SpideyMod
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The viewer will learn how to implement Singleton Design Pattern in Java.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now