Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > BOOK: Beginning ASP.NET 2.0 and Databases
|
BOOK: Beginning ASP.NET 2.0 and Databases
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 and Databases by John Kauffman, Bradley Millington; ISBN: 9780471781349
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 and Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 10th, 2006, 05:35 PM
Registered User
 
Join Date: Oct 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Filtering GridView Records Using a Query String

Chapter 9 : TIO-0908-Details.aspx
I am having MySQL Syntax problem with SELECT...WHERE statement. The following statement produce empty result:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
                    ProviderName="System.Data.Odbc"
                     ConnectionString="DRIVER={MySQL ODBC 3.51 Driver};
                     SERVER=localhost; DATABASE=Stockdb; UID=root; PASSWORD=blabla;OPTION=3"
SelectCommand="SELECT ItemId, ItemTitle FROM MenuItems WHERE ItemId = @'ID' ">
where as in MSSQL it works fine in SelectCommand="SELECT * FROM [authors] WHERE ([au_id] = @au_id)">

Any idea how to tackle this?

 
Old October 12th, 2006, 12:43 PM
Authorized User
 
Join Date: May 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yubmat:

That code does not match up with what I have for TIO 0908. Can you reference the page?

Have you had success with other SQL statements agaisnt this database?

 
Old October 14th, 2006, 09:50 AM
Registered User
 
Join Date: Oct 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes it works with other SQL statement but don't work with WHERE parameter!.Actually I am
working on Query String and I need the value to pass to another page. I know it works for MS SQL but not for MySQL. I am new to MySQL and need help from expert.
 
Old October 19th, 2006, 05:59 AM
Authorized User
 
Join Date: May 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm not an expert in mySql. The book uses (and was testing against) SSE.
For mySql questions I'd suggest the Wrox books on mySQL.

 
Old November 1st, 2006, 09:00 PM
Registered User
 
Join Date: Oct 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by John Kauffman
 I'm not an expert in mySql. The book uses (and was testing against) SSE.
For mySql questions I'd suggest the Wrox books on mySQL.

 
Old November 1st, 2006, 09:03 PM
Registered User
 
Join Date: Oct 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by John Kauffman
 I'm not an expert in mySql. The book uses (and was testing against) SSE.
For mySql questions I'd suggest the Wrox books on mySQL.

Managed to solve using MySQL Connector/NET instead of Connector ODBC. Thanks.





Similar Threads
Thread Thread Starter Forum Replies Last Post
filtering records Vince_421 Access VBA 3 April 2nd, 2007 04:19 PM
filtering records on subform from an unbound combo jd_erd Access 3 February 12th, 2007 11:21 PM
Filtering records using iif statement Anlon Access 2 April 21st, 2005 01:24 PM
Filtering records from Access DB andy24 Classic ASP Databases 1 July 22nd, 2003 08:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.