Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 02-01-2012, 12:53 AM
Junior Member
 
Join Date: 08-22-11
Posts: 9
iTrader: 0 / 0%
Cannot perform '<=' operation on MySql.Data.Types.MySqlDateTime and System.String.

Hi all,

Hoping someone might have an answer to this.

I am build an DataView from a DataTable where the source data is from MySQL.

I dynamically build a selection criteria which works great except for the dates in the source table.

I have tried the following 3 methods and get three different errors:

( ETD_DT <= '2011-03-17 12:11:31' ) and (ETA_DT >= '2011-03-17 12:11:31' )

gives me an error that says
"Cannot perform '<=' operation on MySql.Data.Types.MySqlDateTime and System.String."

So I tried:

( ETD_DT <= #2011-03-17# ) and (ETA_DT >= #2011-03-17# )

gives me an error that says
"Cannot perform '<=' operation on MySql.Data.Types.MySqlDateTime and System.DateTime."


So I tried:

( ETD_DT <= {ts '2011-03-17 12:44:03'} and ETA_DT >= {ts '2011-03-17 12:44:03'} )
gives me an error that says
Syntax error: Missing operand after ''2011-03-17 12:47:47'' operator
 
Reply With Quote
  #2 (permalink)  
Old 02-01-2012, 04:38 AM
ScriptMan's Avatar
Super Moderator
 
Join Date: 02-10-07
Location: Central Kentucky
Posts: 10,071
iTrader: 4 / 100%
I suspect you were just lazy with your examples but those values are identical on both side of the equation. What is the mysql data field type? And what are you trying to do with the data?
__________________
SEO does not mean Spam Everywhere Online
Scriptman's Playhouse || Ramblings from an old man
2013 resolution: Don't feed trolls
ScriptMan
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply

Tags
server error


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
retrieving data from mysql Midwifery Online Coding Forum 16 08-14-2011 11:49 PM
data inside XML string roice Coding Forum 0 04-07-2010 08:00 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 11:51 PM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.