473,414 Members | 1,723 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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.CreateTableDef(NAME:="AMIONtemp",
connect:="Text;" & fileName)

Call DoCmd.TransferText(TransferType:=acImportDelim,
tableName:="TestTemp", fileName:=fileName)
================================================== ==

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.com/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 1711
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******@swbell.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.CreateTableDef(NAME:="AMIONtemp",
connect:="Text;" & fileName)

Call DoCmd.TransferText(TransferType:=acImportDelim,
tableName:="TestTemp", fileName:=fileName)
================================================= ===

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.com/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 PageContentFromPost _
(webURl as string, PostData as String) as String

On Error GoTo errHandler

Dim msXml As Object
Set msXml = CreateObject("Microsoft.XMLHTTP")
msXml.Open "POST", WebUrl, False 'False=wait for response
msXml.setRequestHeader "Content-Type",
"application/x-www-form-urlencoded"

msXml.send (PostData)

PageContentFromPost = msXml.ResponseText

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 TestPageContentFromPost
Dim s as string
s = PageContentFromPost ("http://www.datastuff.com/cgi-bin/ocs" _
"Lo=yourname&Rpt=703&Month=7-5&Select=CC")

Debug.Print s
'Or write it to a file
'Open "c:\PostTest.txt" 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("Microsoft.XMLHTTP")
strURL =
http://www.datastuff.com/cgi-bin/ocs...=7-5&Select=CC
tempXML.Open "GET", strURL, False, "", ""
tempXML.send
tempstr = tempXML.responseText
Call ReadString(tempstr, "DATATemp")
Debug.Print tempXML.responseText
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 PageContentFromPost _
(webURl as string, PostData as String) as String

On Error GoTo errHandler

Dim msXml As Object
Set msXml = CreateObject("Microsoft.XMLHTTP")
msXml.Open "POST", WebUrl, False 'False=wait for response
msXml.setRequestHeader "Content-Type",
"application/x-www-form-urlencoded"

msXml.send (PostData)

PageContentFromPost = msXml.ResponseText

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 TestPageContentFromPost
Dim s as string
s = PageContentFromPost ("http://www.datastuff.com/cgi-bin/ocs" _
"Lo=yourname&Rpt=703&Month=7-5&Select=CC")

Debug.Print s
'Or write it to a file
'Open "c:\PostTest.txt" 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
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...
2
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...
14
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...
2
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...
6
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...
11
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...
9
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...
6
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...
4
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.