Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Cobol v2.1
  HXTT DBF v5.2
  HXTT Excel v4.2
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

HXTT ACCESS
Issues
Abhi
2009-08-26 23:02:01.0
I am querying MS Access DB through JDBC. When I submit some query it works fine and returns the required result. but if I append a like condition in the query, the returned result set is empty, although this same query works while directly accessing the database.

Please let me know why?

Thanks,
Abhi
Re:Issues
HXTT Support
2009-08-27 01:46:06.0
What's your sql? Please send us such a mdb sample.
Re:Re:Issues
Abhi
2009-08-28 00:44:22.0
Hi,

Sorry for the late reply. Here is the query info:

1. The following query works fine from the JDBC and returns required result.

select table1.field1,table1.field2,table1.field3,table2.field4 from table1, table2, table3 where table1.field1 = table3.field1 AND table3.field5 = table2.field5

2. However, if I append a like statement to this query,it still works fine when executed directly on DB using query analyzer but when executed from JDBC, returns empty result set. Here also,it does not give any exception or sany issues like that.

select table1.field1,table1.field2,table1.field3,table2.field4 from table1, table2, table3 where table1.field1 = table3.field1 AND table3.field5 = table2.field5 AND dim_tips.field 4 LIKE '*tip*'

I thought it may be due to inverted commas in the statement and tried evrything from escape sequence and all but still the same result. I have intentionally chnaged the actual field names in the query with teh dummy ones as it may be agai8nst the compay policies. Sorry for that. It is a .mdb database and has been configured using the JDBC-ODBC bridge. I do not think there is any issue in teh configuration as the first query wroks perfectely on DB as well as through JDBC.

Thanks.
Re:Re:Issues
Abhi
2009-08-28 00:46:47.0
Sorry here dim_tips has to be taken as table1 in the second query
Re:Re:Re:Re:Issues
HXTT Support
2009-08-28 00:52:11.0
>dim_tips.field 4 LIKE '*tip*'
Wrong like sql, you should use dim_tips.field 4 LIKE '%tip%'
Re:Re:Re:Re:Re:Issues
Abhi
2009-08-28 03:38:34.0
Hi,

This issue is related to wild character only. The * is used as wild card character while querying the MS Access DB and % is used while querying the SQL database. But here through JDBC, none of them is working. They are taken by the DB thorugh JDBC as actual characters and not wild card charaters even though no escape sequence is used.
Re:Re:Re:Re:Re:Re:Issues
HXTT Support
2009-08-28 03:52:38.0
Try dim_tips.field4 ILIKE '%tip%' to do ignore upper case like.
Re:Re:Re:Re:Re:Re:Re:Issues
Abhi
2009-08-28 04:23:30.0
Sorry but this too doesn't work :(
Re:Re:Re:Re:Re:Re:Re:Re:Issues
HXTT Support
2009-08-28 05:12:13.0
Please send us such a mdb sample.

Search Key   Search by Last 50 Questions




Google
 

Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Email: webmaster@hxtt.com
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap