I finally found the problem. The data type was causing the problem. Once I CAST the results as NChar data types everything worked.
NEW CODE
"SELECT cast(c.name as nchar) as [Column Name], cast(ex.value as NCHAR) as [Description]
FROM...
OLD CODE
SELECT [Column Name] = c.name...
Thanks Phil,
I did use the MSSQL driver prior to upgrading to SQL2008. I don't recall the exact problem I had with the MSSQL but it didn't play well with SQL 2008. Now it seems both the MSand SQLSRV drivers have problems with SQL2008.
Cheers!
Lou
I'm sure you will be shocked by the results... I get Testing and nothing more.
Here's my code
<html>
<body>
<?PHP
echo "Testing";
$connectionInfo = array("UID" => "me_myself", "PWD" => "my_pwrd", "Database"=>"my_db");
$db = sqlsrv_connect("my_srvr",$connectionInfo) or die("Unable to...
I get nothing from your code... I have done it with a dynamic number and it will increment.
echo "<pre>";
print_r($row);
echo "</pre>"
I also tried the following with no success...
$row = sqlsrv_fetch_array($result);
$name = sqlsrv_get_field( $result, 0);
echo $name;
Hi Phil,
I have tried SELECT c.name as Column_Name... and there's nothing in the result that I can see. If I add a simple echo $1; in the while loop I see it count... but that's it. Nothing else.
Thanks again,
Lou
It seems that the problem I'm having comes down to using SQLSRV_FETCH_ARRAY with table type functions. I have some nice functions in SQL that provide results from larger chunks of data. When I use SQLSRV_FETCH_ARRAY or BOTH or NUMERIC the result is a successful execution of the statement, a row...
Thanks for the reply Phil.
After your suggestions and reading some from the MS site
http://technet.microsoft.com/en-us/library/cc296152.aspx
I was able to get the first column to display in PHP using sqlsrv_get_field. However I wasn't successful in retrieving the second column. Here's the code...
Hello,
I'm trying to create a page with a list of column names from a SQL table. The query works in SQL but not in PHP... can anyone offer some help?
<html>
<body>
Testing
<?PHP
$connectionInfo = array("UID" => "me_myslef", "PWD" => "my_password", "Database"=>"my_db","ReturnDatesAsStrings"...
Hello,
I have disabled NetBios and now my mapped drives are not working. So my question is... how do I map drives to my Win2k3 sever from my XPPro workstations with NetBios disabled?
Your help is much appreciated.
Thanks,
Lou
Hello,
I have run into a problem I don't know how to resolve. I have multiple mapped drives on a Win2k3 server. Some drives allow read only access while others allow full control. When creating a hyperlink to a document stored on a read only drive the hyperlink fails with "address not known"...
Hello,
I tried the application launcher but it fails to launch the application. The log shows the following
I also tried to use the option to establish the VPN tunnel before Windsor logon... that didn't work either.
Can anyone make a suggestion?
Thanks,
Lou
Hello,
Is there a way to cause a logon script(W2K3 server) to run after the cisco VPN connection is made? I would like to have access to the mapped drives on our file server when I'm out of the office and connected through a VPN connection.
If there is a better way to achieve this please let...
Hello Ingresman,
Thank you so much. I have been fighting this problem on and off for over a year and never found a solution. I modified my code to match your code and YES FINALLY!!! everything works now.
Your help is greatly appreciated.
Cheers!
Lou
Hello,
Here's my post from a year ago. It has an example of my code. URL:http://bugs.php.net/bug.php?id=43110
I'm not looking for a creation date, I need to create a record for a day in the past.
If anyone can offer a solution I would greatly appreciate it.
Thanks,
Lou
Hello,
Has anyone found a method of passing a datetime parameter from PHP to MSSQL?
I need to create a new record in an MSSQL table with a DateTime data type. I have tried to use the MSSQL_Bind function and that doesn't work. I have also tried passing a tring to the SQL stored procedure and...
Hello,
In my GPO I have locked down the screen saver settings. This appears to have locked the power button settings.
Now the option "When I close the lid of my portable computer" is set to "Standby" and is locked. Since lots of people here use external monitors in the office I need to set...
Hello,
I'm attempting to use WinExit from the Windows Resource Kit and a group policy to ensure idle workstations are logged out.
The problem I'm having is configuring all the settings from the GPO. I created an administrative template as recommended in David Carlin's post here...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.