Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL and HTTP

Author  Topic 

Kyle Doouss
Yak Posting Veteran

64 Posts

Posted - 2013-02-13 : 11:10:19
Hello, I would really apreciate it if someone could help me regards the following. It is the first time I have ever done anything with calling http

Below is what I have got working if you call it from a browser...

https://csv.business.tomtom.com/extern?account=xxxx&username=xxxxx
&password=xxxxx
&lang=gb
&action=sendDestinationOrderExtern
&objectno=EU53 SXG
&orderid=12372
&ordertext=Test
&addrnr=001

The above basically creates an order on the tomtom. I need to send quite a few orders which I can retrieve from a view. I need to basically send all the lines in the view.

Please help... thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-02-13 : 11:20:16
why not send it as a xml value and shred the data out in sql using xml functions?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Kyle Doouss
Yak Posting Veteran

64 Posts

Posted - 2013-02-13 : 11:34:24
Thanks.. could you point me in the right direction on how to do this.

Sorry I am very new to this. Do you use a stored procedure? XML is someithing I have not really used with SQL before.
Go to Top of Page

Kyle Doouss
Yak Posting Veteran

64 Posts

Posted - 2013-02-14 : 08:35:45
I have been looking to see if I could do this with the below

SELECT top 100 percent objectno,
orderid,
ordertext,
addrnr
FROM UDEF_KD_TOMTOM_SendDestinationOrderExtern
FOR XML AUTO
GO

How do I then call this for the multiple lines to the following

https://csv.business.tomtom.com/extern?account=xxxx&username=xxxxx
&password=xxxxx
&lang=gb
&action=sendDestinationOrderExtern


Should I also be hard coding in the &lang=gb
&action=sendDestinationOrderExtern or should I actually put everything from extern? in the table/view?

We be very glad of any help

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-02-14 : 09:47:09
what do you mean call this for multiple lines? where are you generating the url?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Kyle Doouss
Yak Posting Veteran

64 Posts

Posted - 2013-02-14 : 10:23:55
Sorry not to be clear. What I mean is I would have a table with a row for each order I need to send for example the details for the first 2 are below

https://csv.business.tomtom.com/extern?account=xxxx&username=xxxxx
&password=xxxxx
&lang=gb
&action=sendDestinationOrderExtern
&objectno=EU53 SXG
&orderid=12372
&ordertext=Test
&addrnr=001

https://csv.business.tomtom.com/extern?account=xxxx&username=xxxxx
&password=xxxxx
&lang=gb
&action=sendDestinationOrderExtern
&objectno=EU53 SXG
&orderid=12373
&ordertext=Test3
&addrnr=002


I would like to then run a job to import all the row onto the website

Go to Top of Page

Kyle Doouss
Yak Posting Veteran

64 Posts

Posted - 2013-02-14 : 10:26:40
The document I am looking at is on the following link

https://business.tomtom.com/lib/doc/downloads/multilanguage/WEBFLEET.connect-en-1.14.0.pdf
Go to Top of Page
   

- Advertisement -