ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 8th, 2004, 03:20 PM
Genius Genius is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 11 Genius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sending Data from VB app to ASP page online?

Hi,

How should you send data from a local VB-app to an ASP-page that's online?
Let's say; there's an ASPpage that stores data to a database online. The data that must be stored, are some records that are in a huge database on the local machine.
How can I pass these from local to online database?

thanks in advance,
Genius

Reply With Quote
  #2  
Old January 9th, 2004, 12:49 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
It all depends on what access the ASP has to the database which contains the records to be moved. Obviously, if the ASP is running on a web server, out on the net, you will have troubles letting it access your local machine which is behind a firewall etc... the issue isn't ASP code, but networking and security.

Reply With Quote
  #3  
Old January 9th, 2004, 04:46 AM
Genius Genius is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 11 Genius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi,

thx for the reply.

I understand that a remote ASP-page can have difficulties at accessing data on a locale machine.

But I want it the other way.
The local appliaction should update the database that's on a server on the internet.
How can I do that?

thx in advance again,
Genius

Reply With Quote
  #4  
Old January 9th, 2004, 10:18 AM
Relax Relax is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 43 Relax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
erm ..

just let make an ado connection or sth alike to the online database and fill it?
dont really see the problem .. make 2 connections.. 1 to ur local db and 1 to the online one and fill em with the new data ..
i dont think the code is much diff in the vb app compared to the vbscript version (assuming ur using vbscript in ur asp page)

Reply With Quote
  #5  
Old January 9th, 2004, 10:38 AM
Genius Genius is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 11 Genius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
OK, but what path should I refer to?
Now I haved to use "c:\webppliance\username\blabla" in the ASP-page.
Is it possible to use a FTP-path in the connection?
How should I connect then to the online db? (I'm sorry, I'm very new to this...)

Reply With Quote
  #6  
Old January 9th, 2004, 10:43 AM
Relax Relax is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 43 Relax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
what kind of db is it?

Reply With Quote
  #7  
Old January 9th, 2004, 10:44 AM
Genius Genius is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 11 Genius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
MS Access

Reply With Quote
  #8  
Old January 9th, 2004, 10:50 AM
Relax Relax is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 43 Relax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
not sure bout ftp...
you could use a share tho tho that prolly brings some security issues as well..
so u'd share the location where the access file is in and map it on the local pc..

another option would be:
"ms remote"

google for it and else look here:
http://www.able-consulting.com/MDAC...on/MSRemote.htm

Reply With Quote
  #9  
Old January 9th, 2004, 11:01 AM
Relax Relax is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 43 Relax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
also an option might be rds..

http://msdn.microsoft.com/library/d....asp?frame=true

tho i think it's bit old way .. but as long as it works it works

Reply With Quote
  #10  
Old January 10th, 2004, 07:26 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
To connect to the online DB, you need to enter the IP address or ther domain name and full path of the DB in it's connection string. E.g. Provider=Microsoft.Jet.OLEDB.4.0; Data Source=http://www.mydomain.com/db.mdb
Note that you will need to give the DB anonymous write permissions, unless you have some other security setup.

re: FTP idea - not possible. Different thing altogether.

Reply With Quote
  #11  
Old January 11th, 2004, 03:55 AM
Genius Genius is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 11 Genius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thx for the help

But still,
when I'm trying the tutorial from the MSDN library, I can't even connect to the database
Code:
Dim rs As Object   'Recordset
   Dim ds As Object   'RDS.DataSpace
   Dim df As Object   'RDSServer.DataFactory

   Private Sub Form_Load()
     Set ds = CreateObject("RDS.DataSpace")
     Set df = ds.CreateObject("RDSServer.DataFactory", _
        "http://www.rifraf.com")
   End Sub

   Private Sub Command1_Click()
     'This query returns a recordset over HTTP.
     Dim strCn As Variant, strSQL As Variant
     strCn = "data source=http://www.rifraf.com/rifraf.mdb"
     strSQL = "select * from tblRubrieken"
     Set rs = df.Query(strCn, strSQL)
     Debug.Print rs(0)    
   End Sub


When I try to click the button, I get "Error in internet-server" as error.

As I read my way trough the internet about this topic, I learned that there should be a DataFactory-part on server side, to return the recordset to a client.
The webserver I'm using is a shared one, so I have not any permissions to add extra ActiveX dll's or what so ever.

On a other site some one wrote you can create the DataFactory of RDS within a ASP page.
If I do so, how should a save this, where, and what should I keep in mind?

I really need this one solved !!
Plz help me again...

grtz,
Genius - not that much by now

Reply With Quote
  #12  
Old January 14th, 2004, 07:20 AM
amittal amittal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: web Development
Posts: 44 amittal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
I tried it for a long Time at last Give it up.
The only way I see is use XMLHTTP or XMLHTTPSERVER component in VB.
Using these call Asp pages which are on web.
Send any data from VB to asp using query strings.

Write ASP pages to update Web Database based upon these outputs.
Ash

Reply With Quote
  #13  
Old January 14th, 2004, 07:24 AM
Genius Genius is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 11 Genius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Like in
creating asp from VB application (open for output blabla)
FTP this one to the server
open the asp-page from VB app?

Or how can you send data from VB to the querystring() on a asp-page?

thx again,
Genius

Reply With Quote
  #14  
Old January 14th, 2004, 07:38 AM
amittal amittal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: web Development
Posts: 44 amittal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
Public Function GetDataAsString(URLString As String) As String
lResolve = 10 * 1000
lConnect = 20 * 1000
lSend = 30 * 1000
lReceive = 15 * 1000
objXMLHTTP.setTimeouts lResolve, lConnect, lSend, lReceive
' Set the URL property
mURL = "www.yoursite.com/default.asp?Id=7878"

' Let it know that it is a GET operation and set the ASYNC parameter to false
objXMLHTTP.Open "GET", mURL, False

' Send the call
objXMLHTTP.send

GetDataAsString = objXMLHTTP.responseText

End Function

I Don't Know what you are talking about with FTP??

Reply With Quote
  #15  
Old January 14th, 2004, 07:41 AM
Genius Genius is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 11 Genius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Great will try that in a moment.

One more thing?
When using POST, what should I do then?

thx,
Genius

Reply With Quote
  #16  
Old January 14th, 2004, 07:48 AM
amittal amittal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: web Development
Posts: 44 amittal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
If SubmitMethod = enmPOST Then

' Set the URL property to the Requested URL
mURL = URLString

' Set the method of request which is POST and the URL,and set the Async parameter to false
objXMLHTTP.Open "POST", URLString, False

' Sets the header so that the web server knows a form is going to be posted
objXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

' Construct the message body first before we send, it is a name/value pair,separated by ampersands
' which looks like "username=skeevs&password=aaa"
For iCount = 0 To UBound(FormInputArray)
strbody = strbody & FormInputArray(iCount) & "=" & FormValueArray(iCount) & "&"
Next

' Need to remove the last ampersand which was added in the FOR Loop above, so we use the LEFT function
objXMLHTTP.send Left(strbody, Len(strbody) - 1)


-------------------------
Sorry just copied from a project and post it here as it,Surely It will give you an idea how to start.
Otherwise ask me for full code.

Reply With Quote
  #17  
Old January 14th, 2004, 07:51 AM
Genius Genius is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 11 Genius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I think that'll do!

thanks a lot.
Genius

Reply With Quote
  #18  
Old January 14th, 2004, 08:29 AM
Genius Genius is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 11 Genius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Just tried it

It works perfect !!!!
Finally I've got the solution I really wanted ...

Turned out that you're a Genius

Thanks again (A LOT !)
Genius

'The 99 perspiration in the footer is a fact ...

Reply With Quote
  #19  
Old January 14th, 2004, 08:33 AM
amittal amittal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: web Development
Posts: 44 amittal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
Its Real pleasure To assist someone in the community.
Ashish
ashishkmittal1@yahoo.co.uk

Reply With Quote
  #20  
Old September 11th, 2004, 06:13 AM
jvpandian jvpandian is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: India
Posts: 1 jvpandian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question What reference should I use for objXMLHTTP?

Quote:
Originally Posted by Genius
Just tried it

It works perfect !!!!
Finally I've got the solution I really wanted ...

Turned out that you're a Genius

Thanks again (A LOT !)
Genius

'The 99 perspiration in the footer is a fact ...


Dear Genius
Thinks worked fine for you. But when I started trying on this I get confused since I dont know which dll should I refer in VB6 as reference to use objXMLHTTP. Please help me. My requirement is also the same of yours.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Sending Data from VB app to ASP page online?


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap