Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001041

Re: [PHP-DB] Code bombs connecting to MSSQL 7 From: Andrew Hill (ahill <email protected>)
Date: 04/07/01

John,

The quotes are throwing it. Try single or no quotes.

Best regards,
Andrew
---------------------------------------
Andrew Hill - Director Technology Evangelism
OpenLink Software - http://www.openlinksw.com
Internet Data Integration Technology

On 4/6/01 4:30 PM, "John A DAVIS" <John.A.DAVIS <email protected>> wrote:

> THE SQL STATEMENT:
> $data = odbc_do($connection, "Select Distinct [ActivityStatus],
> [WaterSystemStateCode], [WaterSystemName], [PopulationServed], [SeasonBegins],
> [SeasonEnds], [SystemType], Contact, Phone, County, Connections, Address,
> CityStateZip From viewInventory Where [WaterSystemStateCode]=\"OR4100100\"");
> <<BOMBS HERE
>
> THE ERROR:
> Warning: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid
> column name 'OR4100100'., SQL state S0022 in SQLExecDirect in C:/Program
> Files/Apache13 14/Apache/htdocs/sdwis/inventry.php3 on line 21
>
>
> VERIFICATION:
> the field value "OR4100100" exists in the table TINWSYS in the "Number0"
> column(alias: "WaterSystemStateCode"). The same query works in Access linked
> to the MSSQL 7 server. . .
>
> THIS WORKS:
> $data = odbc_do($connection,"Select * From viewInventory");
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>