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" <[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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]