Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

Pass data to website

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kathy - 02 Nov 2006 20:02 GMT
I need to send information from a database to a website.  I am using "Run
App" to call IE, but I can't seem to get the data to show up from the table
into the php page.  

This is what I have done so far:

Private Sub Command19_Click()
On Error GoTo Err_Command19_Click

   Dim stAppName As String

   stAppName = "C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.website.ca/hsregister.php?""lname=TblDemo.[strLastName]&TblDemo.fname
=[strFirstName]&email=TblDemo.[strEmail]&prodid=XX&version=XX
"
       Call Shell(stAppName, 1)

Exit_Command19_Click:
   Exit Sub

Err_Command19_Click:
   MsgBox Err.Description
   Resume Exit_Command19_Click
   
If anyone knows what is missing i would greatly appreciate the help.
BeWyched - 03 Nov 2006 18:41 GMT
Looks like you haven't built the HTTP Get string correctly. Try:

stAppName = "C:\Program Files\Internet Explorer\IEXPLORE.EXE
http://www.website.ca/hsregister.php?lname=" & TblDemo.[strLastName] & "&" &
TblDemo.fname & "=" & [strFirstName] &"&email=" & TblDemo.[strEmail]" &
"&prodid=XX&version=XX"
        Call Shell(stAppName, 1)

Good luck

BW

> I need to send information from a database to a website.  I am using "Run
> App" to call IE, but I can't seem to get the data to show up from the table
[quoted text clipped - 19 lines]
>    
> If anyone knows what is missing i would greatly appreciate the help.
Kathy - 06 Nov 2006 02:40 GMT
Thanks for the response.  Unfortunately I am getting a compile error.  

I copied your code into the vb editor and get the following:
Expected:  Line number or label or statement or end of statement.

If I add a quotation at the beginning of the url, i get a syntex error.

If I and modify the code ie. remove spaces, put all on one line, remove or
add quotations, the best results I have gotten is the field name being
displayed in the web form such as TblDemo.strLastName.  Not the actual data
from the table.

I have also received an Object required error so i changed the filed name to
Tables!TblDemo.strLastName but that still does not work.

Any more suggestions?

> Looks like you haven't built the HTTP Get string correctly. Try:
>
[quoted text clipped - 31 lines]
> >    
> > If anyone knows what is missing i would greatly appreciate the help.
BeWyched - 06 Nov 2006 18:47 GMT
Hi Kathy

A couple of points:

1. Have you though of using the 'FollowHyperlink' method? It seems to be
more stable than the approach you've taken..

The syntax is:

Application.FollowHyperlink
"http://www.website.ca/hsregister.php?variable1=value1&variable2=value2&etc."

2. If the web page isn't displaying the correct values then its likely that
the string after the '?' isn't correct. Try debugging - e.g. add the line:
msgbox "?lname=" & TblDemo.[strLastName] & "&" &  TblDemo.fname & "=" &
[strFirstName] "&email=" & TblDemo.[strEmail]" &  "&prodid=XX&version=XX"

and see what it looks like. If it looks OK try pasting it straight into your
web browser and see if you get the correct response. If not, then re-work the
string.

BW

> Thanks for the response.  Unfortunately I am getting a compile error.  
>
[quoted text clipped - 48 lines]
> > >    
> > > If anyone knows what is missing i would greatly appreciate the help.
BeWyched - 06 Nov 2006 19:05 GMT
Hi Kathy

Me again!

I've just noticed that your GET string looks strange.

The format is usually:
URL?variable1=value1&variable2=value2&variable3=value3 etc.

However, you seem to have a value as a variable at ...:

"&" & TblDemo.fname & "=" & [strFirstName]

This reads like ... value=value which doesn't make sense?

Something like ...:
"&fname=" & [strFirstName] would make sense. Obviously fname, lname etc.
have to tie in with the 'request' commands in your php page.

We'll get there in the end!

BW

> Thanks for the response.  Unfortunately I am getting a compile error.  
>
[quoted text clipped - 48 lines]
> > >    
> > > If anyone knows what is missing i would greatly appreciate the help.
Kathy - 06 Nov 2006 22:26 GMT
Thanks so much for sticking with this issue.  

You are right, about my string.  I have been testing it with the correct
syntex though. For now I have dropped all additional fields until I get one
to work so I have just been using the last name field.

I have tried your suggestion for the Follow Hyperlink method and I end up
with the same result.

I have also changed the event to run on the registration form where the form
object is active in case that made a difference.  But it continues to
populate the data that is typed rather than finding the data in the table or
form.  

...php? lname = Forms!FrmDemo.strLastName and Forms!FrmDemo.strlLastName is
displaying in the php page in the lname placeholder as well in the browser
address bar.

do i have to open a connection or "call" the data into the script some how
before I can send the data to the web?

> Hi Kathy
>
[quoted text clipped - 71 lines]
> > > >    
> > > > If anyone knows what is missing i would greatly appreciate the help.
BeWyched - 06 Nov 2006 23:04 GMT
Hi Kathy

I'm not sure I understand from your post how you are
inputting/preparing/presenting the data to be captured for the string.

If you would like to e-mail the application I'll be happy to get it sorted
for you - send to barry.wycherley@theifsgroup.com

Note that its nearly midnight here (in the UK) so I won't respond until
tomorrow (have to get some sleep some time)!!

BW

> I need to send information from a database to a website.  I am using "Run
> App" to call IE, but I can't seem to get the data to show up from the table
[quoted text clipped - 19 lines]
>    
> If anyone knows what is missing i would greatly appreciate the help.
Kathy - 07 Nov 2006 13:44 GMT
Good Afternoon?..BeWyched

Thank you for your perseverance and offer to work on my issue.  I was
preparing to send you the database and decided to give it one more try.  Low
and behold I got if figured out!

Code is obviously not my strong suit!

Thanks again, it is greatly appreciated.

> Hi Kathy
>
[quoted text clipped - 32 lines]
> >    
> > If anyone knows what is missing i would greatly appreciate the help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.