Working with client workstations - newbie question

J

JSM

HI,

I have an existing VB6 / SQL Server cataloging application which I wish to
convert to a web based application. I figure this would be a good project
which I could use to learn ASP .NET. I'm sure I can figure out how to
interrogate the SQL database etc on the server side, but what I am not sure
how to do is interact with the client machine. I will need to be able to
read the serial number of the CD inserted in the client workstation as well
as read the contents of the CD for indexing purposes. All this information
will obviously then need to be passed back to my .NET server-side code for
processing.

Can somebody please :

A: tell me if this can be done

B: point me in the right direction on how to go about doing this.

Thanks in advance

John
 
J

Joao S Cardoso [MVP]

The only way I see you can do this is to create an component that using the
browser is downloaded to the client machine, installed and then would gather the
info you need and send it back to the server.

But for that, for instance, if you create this component in .NET you would need
to install the -NET framework on the client machine also.
regards,

Joao Cardoso (MVP dotNET)
=======================================================
[LusoCoders]- http://groups.yahoo.com/group/lusocoders/
[PontoNetPT]- http://www.programando.net/regras.aspx
(e-mail address removed) - www.acinet.pt
=======================================================
 
Y

Yan-Hong Huang[MSFT]

Hello John,

Joao is right.

1) It can be done.

2) How to do it then?
Please keep in mind that asp.net code behind is running on server machine. So we need to find a way to run the code in
client's machine. In order to do so, we could use a typical way, such as using an ActiveX control and download it in client's
machine. In this way, the code can be run on client's machine and so it could do what you VB6 app did.

Did I answer your question? Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: "JSM" <[email protected]>
!Subject: Working with client workstations - newbie question
!Date: Sun, 27 Jul 2003 22:22:14 +1000
!Lines: 24
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
!Message-ID: <[email protected]>
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!NNTP-Posting-Host: ppp150.dyn1.pacific.net.au 61.8.1.150
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:162404
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!HI,
!
!I have an existing VB6 / SQL Server cataloging application which I wish to
!convert to a web based application. I figure this would be a good project
!which I could use to learn ASP .NET. I'm sure I can figure out how to
!interrogate the SQL database etc on the server side, but what I am not sure
!how to do is interact with the client machine. I will need to be able to
!read the serial number of the CD inserted in the client workstation as well
!as read the contents of the CD for indexing purposes. All this information
!will obviously then need to be passed back to my .NET server-side code for
!processing.
!
!Can somebody please :
!
!A: tell me if this can be done
!
!B: point me in the right direction on how to go about doing this.
!
!Thanks in advance
!
!John
!
!
!
!
 
Y

Yan-Hong Huang[MSFT]

Hello John,

In asp.net, you could also use code behind to communicate with the server database using ado.net.

http://msdn.microsoft.com/library/en-us/cpguide/html/cpconaccessingdatawithadonet.asp?frame=true

By the way, Did you change your email address in newsgroup? If so, I think you need to register it again to make sure that
your posts will be shown as managed posts later . Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: "JSM" <[email protected]>
!References: <[email protected]> <[email protected]>
!Subject: Re: Working with client workstations - newbie question
!Date: Wed, 30 Jul 2003 13:52:41 +1000
!Lines: 91
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
!Message-ID: <[email protected]>
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!NNTP-Posting-Host: 203.32.158.198
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:163223
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!Thanks for your reply. Sorry for sounding a bit dumb, but how do I send the
!information obtained by the ActiveX control back to the server.
!
!For example, I want to index the CD which could contain several hundred
!files. In my VB program these just get added to the SQL database on the fly
!via a batch update. What I don't understand is in an ASP environment, how do
!I send this amount of information back to my ASP application which I assume
!would be updating my SQL database?
!
!Cheers,
!
!John
!
!
!!> Hello John,
!>
!> Joao is right.
!>
!> 1) It can be done.
!>
!> 2) How to do it then?
!> Please keep in mind that asp.net code behind is running on server machine.
!So we need to find a way to run the code in
!> client's machine. In order to do so, we could use a typical way, such as
!using an ActiveX control and download it in client's
!> machine. In this way, the code can be run on client's machine and so it
!could do what you VB6 app did.
!>
!> Did I answer your question? Thanks.
!>
!> Best regards,
!> Yanhong Huang
!> Microsoft Online Partner Support
!>
!> Get Secure! - www.microsoft.com/security
!> This posting is provided "AS IS" with no warranties, and confers no
!rights.
!>
!> --------------------
!> !From: "JSM" <[email protected]>
!> !Subject: Working with client workstations - newbie question
!> !Date: Sun, 27 Jul 2003 22:22:14 +1000
!> !Lines: 24
!> !X-Priority: 3
!> !X-MSMail-Priority: Normal
!> !X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
!> !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
!> !Message-ID: <[email protected]>
!> !Newsgroups: microsoft.public.dotnet.framework.aspnet
!> !NNTP-Posting-Host: ppp150.dyn1.pacific.net.au 61.8.1.150
!> !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
!> !Xref: cpmsftngxa06.phx.gbl
!microsoft.public.dotnet.framework.aspnet:162404
!> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!> !
!> !HI,
!> !
!> !I have an existing VB6 / SQL Server cataloging application which I wish
!to
!> !convert to a web based application. I figure this would be a good project
!> !which I could use to learn ASP .NET. I'm sure I can figure out how to
!> !interrogate the SQL database etc on the server side, but what I am not
!sure
!> !how to do is interact with the client machine. I will need to be able to
!> !read the serial number of the CD inserted in the client workstation as
!well
!> !as read the contents of the CD for indexing purposes. All this
!information
!> !will obviously then need to be passed back to my .NET server-side code
!for
!> !processing.
!> !
!> !Can somebody please :
!> !
!> !A: tell me if this can be done
!> !
!> !B: point me in the right direction on how to go about doing this.
!> !
!> !Thanks in advance
!> !
!> !John
!> !
!> !
!> !
!> !
!>
!>
!
!
!
 
J

JSM

Thanks again for your reply.

However there is still a step that I am not understanding here. I understand
that you use ado.net to communicate with the database on the server side,
but what I don't understand is how do I get the information from the client
component out of the component and back to my server side code in order to
enter it into the database.

In the example I gave, I will be indexing the files on a local CD. I
understand that I can create a component which downloads onto the client PC,
gathers my information into a recordset (presumably). So I have this
component on the client side which has all this information which I've got
to get back to the server. The client may not be on the same network as the
server, it could be on the other side of the world so I can't connect to the
SQL server from within the component (not that I am aware of anyway).
Therefore I have to send the information from my client-side script which
created the client component back to my ASP .NET code. I know how to post
information to the server via forms but that is only individual form fields,
what I'm really not getting though is how do I send information such as the
details of several hundred file names back? Can you pass objects like
recordsets between the client and server? If so how?

Am I way off track here?

Thanks in advance,

John

Yan-Hong Huang said:
Hello John,

In asp.net, you could also use code behind to communicate with the server database using ado.net.

http://msdn.microsoft.com/library/en-us/cpguide/html/cpconaccessingdatawitha
donet.asp?frame=true

By the way, Did you change your email address in newsgroup? If so, I think
you need to register it again to make sure that
 
J

John Saunders

John,

My recommendation would be that you should abstract the question a bit.
Instead of asking how you'd get data from an ActiveX component on the client
into an SQL Server database on the server, ask how you can get data (in
general) from the client to the server. Some of the techniques you could use
are obviously unsuited to the amount of data you need to send (query
strings, cookies, form fields).

That narrows things down to files and web services. Either your ActiveX
control could gather its data into an XML file and then post it to the
server (where ADO.NET is very good at dealing with XML), or it could invoke
a web service on the server to send the data.
 
Y

Yan-Hong Huang[MSFT]

Good explanation. John, do you have any more concerns?

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: "John Saunders" <[email protected]>
!References: <[email protected]> <[email protected]>
<[email protected]> <[email protected]> <el$VM1oVDHA.1600
@TK2MSFTNGP09.phx.gbl>
!Subject: Re: Working with client workstations - newbie question
!Date: Wed, 30 Jul 2003 08:36:06 -0400
!Lines: 215
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!Message-ID: <[email protected]>
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!NNTP-Posting-Host: pool-151-199-53-27.bos.east.verizon.net 151.199.53.27
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:163326
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!John,
!
!My recommendation would be that you should abstract the question a bit.
!Instead of asking how you'd get data from an ActiveX component on the client
!into an SQL Server database on the server, ask how you can get data (in
!general) from the client to the server. Some of the techniques you could use
!are obviously unsuited to the amount of data you need to send (query
!strings, cookies, form fields).
!
!That narrows things down to files and web services. Either your ActiveX
!control could gather its data into an XML file and then post it to the
!server (where ADO.NET is very good at dealing with XML), or it could invoke
!a web service on the server to send the data.
!
!--
!John Saunders
!Internet Engineer
[email protected]
!
!!> Thanks again for your reply.
!>
!> However there is still a step that I am not understanding here. I
!understand
!> that you use ado.net to communicate with the database on the server side,
!> but what I don't understand is how do I get the information from the
!client
!> component out of the component and back to my server side code in order to
!> enter it into the database.
!>
!> In the example I gave, I will be indexing the files on a local CD. I
!> understand that I can create a component which downloads onto the client
!PC,
!> gathers my information into a recordset (presumably). So I have this
!> component on the client side which has all this information which I've got
!> to get back to the server. The client may not be on the same network as
!the
!> server, it could be on the other side of the world so I can't connect to
!the
!> SQL server from within the component (not that I am aware of anyway).
!> Therefore I have to send the information from my client-side script which
!> created the client component back to my ASP .NET code. I know how to post
!> information to the server via forms but that is only individual form
!fields,
!> what I'm really not getting though is how do I send information such as
!the
!> details of several hundred file names back? Can you pass objects like
!> recordsets between the client and server? If so how?
!>
!> Am I way off track here?
!>
!> Thanks in advance,
!>
!> John
!>
!> !> > Hello John,
!> >
!> > In asp.net, you could also use code behind to communicate with the
!server
!> database using ado.net.
!> >
!> >
!>
!http://msdn.microsoft.com/library/en-us/cpguide/html/cpconaccessingdatawitha
!> donet.asp?frame=true
!> >
!> > By the way, Did you change your email address in newsgroup? If so, I
!think
!> you need to register it again to make sure that
!> > your posts will be shown as managed posts later . Thanks.
!> >
!> > Best regards,
!> > Yanhong Huang
!> > Microsoft Online Partner Support
!> >
!> > Get Secure! - www.microsoft.com/security
!> > This posting is provided "AS IS" with no warranties, and confers no
!> rights.
!> >
!> > --------------------
!> > !From: "JSM" <[email protected]>
!> > !References: <[email protected]>
!> <[email protected]>
!> > !Subject: Re: Working with client workstations - newbie question
!> > !Date: Wed, 30 Jul 2003 13:52:41 +1000
!> > !Lines: 91
!> > !X-Priority: 3
!> > !X-MSMail-Priority: Normal
!> > !X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
!> > !X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
!> > !Message-ID: <[email protected]>
!> > !Newsgroups: microsoft.public.dotnet.framework.aspnet
!> > !NNTP-Posting-Host: 203.32.158.198
!> > !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
!> > !Xref: cpmsftngxa06.phx.gbl
!> microsoft.public.dotnet.framework.aspnet:163223
!> > !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!> > !
!> > !Thanks for your reply. Sorry for sounding a bit dumb, but how do I send
!> the
!> > !information obtained by the ActiveX control back to the server.
!> > !
!> > !For example, I want to index the CD which could contain several hundred
!> > !files. In my VB program these just get added to the SQL database on the
!> fly
!> > !via a batch update. What I don't understand is in an ASP environment,
!how
!> do
!> > !I send this amount of information back to my ASP application which I
!> assume
!> > !would be updating my SQL database?
!> > !
!> > !Cheers,
!> > !
!> > !John
!> > !
!> > !
!> > !!> > !> Hello John,
!> > !>
!> > !> Joao is right.
!> > !>
!> > !> 1) It can be done.
!> > !>
!> > !> 2) How to do it then?
!> > !> Please keep in mind that asp.net code behind is running on server
!> machine.
!> > !So we need to find a way to run the code in
!> > !> client's machine. In order to do so, we could use a typical way, such
!> as
!> > !using an ActiveX control and download it in client's
!> > !> machine. In this way, the code can be run on client's machine and so
!it
!> > !could do what you VB6 app did.
!> > !>
!> > !> Did I answer your question? Thanks.
!> > !>
!> > !> Best regards,
!> > !> Yanhong Huang
!> > !> Microsoft Online Partner Support
!> > !>
!> > !> Get Secure! - www.microsoft.com/security
!> > !> This posting is provided "AS IS" with no warranties, and confers no
!> > !rights.
!> > !>
!> > !> --------------------
!> > !> !From: "JSM" <[email protected]>
!> > !> !Subject: Working with client workstations - newbie question
!> > !> !Date: Sun, 27 Jul 2003 22:22:14 +1000
!> > !> !Lines: 24
!> > !> !X-Priority: 3
!> > !> !X-MSMail-Priority: Normal
!> > !> !X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
!> > !> !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
!> > !> !Message-ID: <[email protected]>
!> > !> !Newsgroups: microsoft.public.dotnet.framework.aspnet
!> > !> !NNTP-Posting-Host: ppp150.dyn1.pacific.net.au 61.8.1.150
!> > !> !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
!> > !> !Xref: cpmsftngxa06.phx.gbl
!> > !microsoft.public.dotnet.framework.aspnet:162404
!> > !> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!> > !> !
!> > !> !HI,
!> > !> !
!> > !> !I have an existing VB6 / SQL Server cataloging application which I
!> wish
!> > !to
!> > !> !convert to a web based application. I figure this would be a good
!> project
!> > !> !which I could use to learn ASP .NET. I'm sure I can figure out how
!to
!> > !> !interrogate the SQL database etc on the server side, but what I am
!not
!> > !sure
!> > !> !how to do is interact with the client machine. I will need to be
!able
!> to
!> > !> !read the serial number of the CD inserted in the client workstation
!as
!> > !well
!> > !> !as read the contents of the CD for indexing purposes. All this
!> > !information
!> > !> !will obviously then need to be passed back to my .NET server-side
!code
!> > !for
!> > !> !processing.
!> > !> !
!> > !> !Can somebody please :
!> > !> !
!> > !> !A: tell me if this can be done
!> > !> !
!> > !> !B: point me in the right direction on how to go about doing this.
!> > !> !
!> > !> !Thanks in advance
!> > !> !
!> > !> !John
!> > !> !
!> > !> !
!> > !> !
!> > !> !
!> > !>
!> > !>
!> > !
!> > !
!> > !
!> >
!> >
!>
!>
!
!
!
 
J

JSM

Thanks for your help. At least now I know that it can be done and I have a
direction to head in.

Cheers !

Yan-Hong Huang said:
Good explanation. John, do you have any more concerns?

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top