473,732 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

capturing web data thru access...

They have a new data collection station. The people here are using
access 97....
This third party site will only post data back to us when we do this.
http://www.datastuff.com/cgi-bin/ocs...=7-5&Select=CC

this is posted back to us as a file called data.
There is no extension to is so the first thing that IE does is ask to
save and where.

I want to be able to open this file in access but the first problem is
no way to auto save.might be because it has no file extension

this is the code I was trying
=============== =============== =============== ======
Dim fileName As String

fileName =
http://www.datastuff.com/cgi-bin/ocs...=7-5&Select=CC

Set tdf = CurrentDb.Creat eTableDef(NAME: ="AMIONtemp" ,
connect:="Text; " & fileName)

Call DoCmd.TransferT ext(TransferTyp e:=acImportDeli m,
tableName:="Tes tTemp", fileName:=fileN ame)
=============== =============== =============== =======

I was trying to just capture the data instead of dl the data.

=============== =============== =======

so then I tried
==========
Dim logon As String
Dim rpt As Integer
Dim fileURL As String
Dim rstLog As Recordset
Dim rstSchedule As Recordset

logon = "yourname"
rpt = 703
fileURL = "http://www.datastuff.c om/cgi-bin/ocs?" & _
"Lo=" & logon & _
"&Rpt=" & rpt & _
"&Month=" & month & "-" & year & _
"&Select=" & clinic

=========
thinking that the ? would have to be parsed into the name...but I am
not even sure if this is a problem or exactly what the problem is.
but even when I go to the link and put in the data it prompts for a
save.
But its not like a normal open/save/cancel its just save/cancel
so does this file exist at the time?

is there a way to have access get the tab delimited data from this
link and import it directly into access table?

if not is there a way to automate the save so there is no prompt,
allow me to pass the save parameters and have it save automatically so
the user sees nothing. and then open the file locally and import is no
problem.
this is my first experience with this type of thing and I have no idea
exactly what I am trying to do.

I just need to get the data into a table without the user doing
anything but picking a month and a year from a pulldown. Has anyone
tried to import text in this type of situation?

thanks for any ideas

Jerry

Nov 13 '05 #1
3 1726
Ok I got this far and then ouch.

filename isn't a valid path
http://www.datastuff.com//cgi-bin/
how is it getting only the first part and not saying that its a valid
path for the entire string?
http://www.datastuff.com/cgi-bin/ocs...=7-5&Select=CC

is the arguement parameters that are not passed after it tries to
connect.
the string works in ie and I am asked where to save the file

=============== =============== =====
=============== =============== =====

On Tue, 16 Aug 2005 14:55:38 GMT, sparks <js******@swbel l.net> wrote:
They have a new data collection station. The people here are using
access 97....
This third party site will only post data back to us when we do this.
http://www.datastuff.com/cgi-bin/ocs...=7-5&Select=CC

this is posted back to us as a file called data.
There is no extension to is so the first thing that IE does is ask to
save and where.

I want to be able to open this file in access but the first problem is
no way to auto save.might be because it has no file extension

this is the code I was trying
============== =============== =============== =======
Dim fileName As String

fileName =
http://www.datastuff.com/cgi-bin/ocs...=7-5&Select=CC

Set tdf = CurrentDb.Creat eTableDef(NAME: ="AMIONtemp" ,
connect:="Text ;" & fileName)

Call DoCmd.TransferT ext(TransferTyp e:=acImportDeli m,
tableName:="Te stTemp", fileName:=fileN ame)
============== =============== =============== ========

I was trying to just capture the data instead of dl the data.

============== =============== ========

so then I tried
==========
Dim logon As String
Dim rpt As Integer
Dim fileURL As String
Dim rstLog As Recordset
Dim rstSchedule As Recordset

logon = "yourname"
rpt = 703
fileURL = "http://www.datastuff.c om/cgi-bin/ocs?" & _
"Lo=" & logon & _
"&Rpt=" & rpt & _
"&Month=" & month & "-" & year & _
"&Select=" & clinic

=========
thinking that the ? would have to be parsed into the name...but I am
not even sure if this is a problem or exactly what the problem is.
but even when I go to the link and put in the data it prompts for a
save.
But its not like a normal open/save/cancel its just save/cancel
so does this file exist at the time?

is there a way to have access get the tab delimited data from this
link and import it directly into access table?

if not is there a way to automate the save so there is no prompt,
allow me to pass the save parameters and have it save automatically so
the user sees nothing. and then open the file locally and import is no
problem.
this is my first experience with this type of thing and I have no idea
exactly what I am trying to do.

I just need to get the data into a table without the user doing
anything but picking a month and a year from a pulldown. Has anyone
tried to import text in this type of situation?

thanks for any ideas

Jerry


Nov 13 '05 #2
rkc
sparks wrote:
They have a new data collection station. The people here are using
access 97....
This third party site will only post data back to us when we do this.
http://www.datastuff.com/cgi-bin/ocs...=7-5&Select=CC

this is posted back to us as a file called data.
There is no extension to is so the first thing that IE does is ask to
save and where.

I want to be able to open this file in access but the first problem is
no way to auto save.might be because it has no file extension

this is the code I was trying
=============== =============== =============== ======
Dim fileName As String

fileName =
http://www.datastuff.com/cgi-bin/ocs...=7-5&Select=CC


This is modified from something I use to post data to an .Asp page.
Maybe it will work for you.
Private Function PageContentFrom Post _
(webURl as string, PostData as String) as String

On Error GoTo errHandler

Dim msXml As Object
Set msXml = CreateObject("M icrosoft.XMLHTT P")
msXml.Open "POST", WebUrl, False 'False=wait for response
msXml.setReques tHeader "Content-Type",
"applicatio n/x-www-form-urlencoded"

msXml.send (PostData)

PageContentFrom Post = msXml.ResponseT ext

exitHere:

If not msXML is Nothing Then
Set msXml = Nothing
End If
Exit Function
errHandler:
Err.Raise Err.Number, , _
"Error retrieving data from " & WebUrl & vbCrLf & Err.Description
Resume exitHere
End Function
Sub TestPageContent FromPost
Dim s as string
s = PageContentFrom Post ("http://www.datastuff.c om/cgi-bin/ocs" _
"Lo=yourname&Rp t=703&Month=7-5&Select=CC")

Debug.Print s
'Or write it to a file
'Open "c:\PostTest.tx t" for Output as #1
'Print #1, s
'Close #1
End Sub

Nov 13 '05 #3
Thanks big time for the pointer
I basically did this and it worked fine..
Public Function test2(mon As Integer, yr As Integer)
Dim dater As String
dater = mon & "-" & yr
Debug.Print dater
Dim tempXML As Object
Dim strURL As String
Dim tempstr As String
Set tempXML = CreateObject("M icrosoft.XMLHTT P")
strURL =
http://www.datastuff.com/cgi-bin/ocs...=7-5&Select=CC
tempXML.Open "GET", strURL, False, "", ""
tempXML.send
tempstr = tempXML.respons eText
Call ReadString(temp str, "DATATemp")
Debug.Print tempXML.respons eText
Set tempXML = Nothing
End Function
again thanks for pointing me in the right direction

Jerry

On Tue, 16 Aug 2005 22:08:28 GMT, rkc
<rk*@rochester. yabba.dabba.do. rr.bomb> wrote:
sparks wrote:
They have a new data collection station. The people here are using
access 97....
This third party site will only post data back to us when we do this.
http://www.datastuff.com/cgi-bin/ocs...=7-5&Select=CC

this is posted back to us as a file called data.
There is no extension to is so the first thing that IE does is ask to
save and where.

I want to be able to open this file in access but the first problem is
no way to auto save.might be because it has no file extension

this is the code I was trying
=============== =============== =============== ======
Dim fileName As String

fileName =
http://www.datastuff.com/cgi-bin/ocs...=7-5&Select=CC


This is modified from something I use to post data to an .Asp page.
Maybe it will work for you.
Private Function PageContentFrom Post _
(webURl as string, PostData as String) as String

On Error GoTo errHandler

Dim msXml As Object
Set msXml = CreateObject("M icrosoft.XMLHTT P")
msXml.Open "POST", WebUrl, False 'False=wait for response
msXml.setReques tHeader "Content-Type",
"applicatio n/x-www-form-urlencoded"

msXml.send (PostData)

PageContentFro mPost = msXml.ResponseT ext

exitHere:

If not msXML is Nothing Then
Set msXml = Nothing
End If
Exit Function
errHandler:
Err.Raise Err.Number, , _
"Error retrieving data from " & WebUrl & vbCrLf & Err.Description
Resume exitHere
End Function
Sub TestPageContent FromPost
Dim s as string
s = PageContentFrom Post ("http://www.datastuff.c om/cgi-bin/ocs" _
"Lo=yourname&Rp t=703&Month=7-5&Select=CC")

Debug.Print s
'Or write it to a file
'Open "c:\PostTest.tx t" for Output as #1
'Print #1, s
'Close #1
End Sub


Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5017
by: SenseForAll | last post by:
First please note I am a novice at VBA and not even that experienced with DAO/ADO and MS-SQL. Any assistance is appreciated. That said... I have an application written in Access w/ VBA. I need to get some data out of a SQL server and into an Access table. I don't know anything about the SQL server data model or structure. I don't have access rights to link to the SQL table. What I do have is the rights and information to run a stored...
2
2021
by: vulcaned | last post by:
I'm thinking I might want to move the back-end to one of my Access97 applications to SQLServer instead of continuing to use Access jet but before I start/do that I have several questions I'm hoping can be answered as I have not yet used SQLServer for a back-end. 1. Just moving my tables from a jet back-end to a SQLServer back-end and not changing anything else will not improve performance, True???? 2. If I create pass-thru queries can...
14
2545
by: Brent Burkart | last post by:
I am trying to capture the Windows Authenticated username, but I want to be able to capture the login name that exists in IIS, not Windows. In order to enter my company's intranet through the internet, they have to login. I want to be able to capture that login versus their Windows login because I need to know who they are from any computer rather than only their computer. Any ideas? Thanks
2
6451
by: Andrew | last post by:
Hi, I have a problem capturing the checkboxes that are checked, I get false irrespective of wether they are checked or not. I have gone thru the sample code on this forum, but they dun seem to work. This is the code that I used to go thru the repeater control to find my checkboxes. foreach(RepeaterItem r in MyRepeater.Items)
6
2265
by: Ed Leafe | last post by:
I've been approached by a local business that has been advised that they need to start capturing and archiving their instant messaging in order to comply with Sarbanes-Oxley. The company is largely PC, but has a significant number of Macs running OS X, too. Googling around quickly turns up IM Grabber for the PC, which would seem to be just what they need. But there is no equivalent to be found for OS X. So if anyone knows of any such...
11
1456
by: Tony Girgenti | last post by:
Hello. I have attached the XML data in question at the end of this post. I don't understand what is between <TripDataand </TripData>. When i talked to the publisher of the XML document, he says: "you will have to use childattributes to access the attributes of the <TripDataelement". When i try to iterate thru the XML document to determine the nodetype of each element, it says that <TripDatais an Element of type #text.
9
4024
by: Anil Gupte | last post by:
After reading a tutorial and fiddling, I finally got this to work. I can now put two tables created with a DataTable class into a DataRelation. Phew! And it works! Dim tblSliceInfo As New DataTable("SliceInfo") Dim tblSliceRatings As New DataTable("SliceRatings") '.... All the adding datacolumns, datarows, etc. goes here.. DatasetInit.Tables.Add(tblSliceInfo)
6
8163
Cintury
by: Cintury | last post by:
Hi all, I've developed a mobile application for windows mobile 5.0 that has been in use for a while (1 year and a couple of months). It was developed in visual studios 2005 with a back-end sql server mobile ce database. Until recently I was synching everything thru a com port serial cable. The devices would connect to the computer thru activesync and are able to acquire an internet connection. The sync for the program occurs thru a website...
4
4531
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst child apps of an IIS application and can be used by multiple users during the application life cycle and for multiple page loads for the same or different page under a root application. What I don't understand and need to know is whether that...
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9307
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9181
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.