473,326 Members | 2,126 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,326 software developers and data experts.

using msMSL and stored Procedures (EXEC)

Hi all

I am trying to get the following to work

<?php
$startPidpoint = $_REQUEST["startPidpoint"];
$endPidpoint = $_REQUEST["endPidpoint"];
$connectionstring = odbc_connect('DB','user','password');
$stmt = odbc_prepare($connectionstring, 'EXEC getHistoryLocation ?
?;');
$result =
odbc_execute($stmt,array($startPidpoint),array($en dPidpoint));

header("Expires: Mon, 3 Jan 2000 08:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("content-type:text/xml");
echo "<locations>";
while (odbc_fetch_row($stmt)) {
$pidpoint = odbc_result($stmt,"pid");
$Latitude = odbc_result($stmt,"latitude");
$Longitude = odbc_result($stmt,"longitude");
$Speed = odbc_result($stmt,"speed");
$Angle = odbc_result($stmt,"angle");
echo ' <location id="'.$pidpoint.'" lat="'.$Latitude.'"
lng="'.$Longitude.'" speed="'.$Speed.'" angle="'.$Angle.'"/>';
}
echo "</locations>";

odbc_close($connectionstring);
?>

I think I have two problems,

1. Is the syntax for the "odbc_prepare" correct? Given this is a msSQL
Server,
2. odbc_execute returns a bool, so I can't use $result, but the $stmt
is a resource so I should be able to use the "odbc_fetch_row" but it's
not working.

Can anyone see what I am doing wrong.

Thanks

Shawn

Aug 28 '06 #1
0 902

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

Similar topics

4
by: Racer-D | last post by:
When some of the SQL Server stored procedures I have written are called via my Classic ASP page I have written I get the following error in the cell that is supposed to be retrieving a single...
11
by: Bã§TãRÐ | last post by:
I have been working on this particular project for a little over 2 weeks now. This product contains between 700-900 stored procedures to handle just about all you can imagine within the product. I...
5
by: gilles27 | last post by:
I've ready many of the posts on this and other newsgroups in which people describe working practices for source control of database scripts. We are looking to implement something similar in my...
10
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I...
7
by: Jeff Wang | last post by:
Hi all, Can someone help me out? I've been struggling with this for almost a week and still have no clue what's wrong. Basically I want to write a DB2 stored procedure for OS/390 in REXX. In...
2
by: Not Me | last post by:
Hey, Coming back to a piece of work I did a while back, which used a stored procedure to populate a list box. The SP takes a single parameter, and I think this is the reasoning for using 'exec'...
28
by: mooreit | last post by:
The purpose for my questions is accessing these technologies from applications. I develop both applications and databases. Working with Microsoft C#.NET and Microsoft SQL Server 2000 Production and...
2
by: Roy | last post by:
Hey all, Here's a small VB codeblock that connects to a database and uses 2 SQL queries then forms a relation for a master/detail view on the aspx side: Private Sub Binddata(ByVal name As...
2
by: DaBrain | last post by:
I am no DBA, but this is my task. I have an SQL Server 2000 Database that has an "SQL Account" that has execute permission on all Stored procedures. it is what was used by the company. This...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.