Select statement for boolean and/or DateTime values?
- From: "Olaf Krause" <olaf.krause@xxxxxxxxx>
- Date: Sat, 20 Oct 2007 11:10:57 +0200
Hi together,
What I'm currently using is something like
IDbCommand cmd=AdoProviderFactory.GetCommand(command,m_DB.Connection,m_DB.ProviderType);
IDataReader reader = cmd.ExecuteReader();
here cmd is an Ole, ODBC (e.g. MSAccess), SqLite or SqlCommand depending on the Provider, command is a string like
SELECT * FROM table WHERE booleancolumn= 'false'AND datetimecolumn='20.10.2007 10:43:25'
The above works for an SQL Server, means reader contains the row I'm looking for. But for the rest the select statement seems not to work as expected.
I thought it should be simple but now I'm looking for a common solution since several days reading dozends of google hits etc...
So my questions are:
* As there a way to create a common sql statement that works for all above database providers? If not how should the statement lookm like for SQLite and/or MSAccess? Sorry might be a newbie here ;)
* Or maybe there in another alternative to query for the row I'm looking for?
thx in advance for any help
.
- Follow-Ups:
- Re: Select statement for boolean and/or DateTime values?
- From: Bob Barrows [MVP]
- Re: Select statement for boolean and/or DateTime values?
- Prev by Date: Re: What could be the problem with this INSERT with ADO parameters?
- Next by Date: Re: Select statement for boolean and/or DateTime values?
- Previous by thread: What could be the problem with this INSERT with ADO parameters?
- Next by thread: Re: Select statement for boolean and/or DateTime values?
- Index(es):