Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics 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 July 24th, 2007, 02:17 PM
Registered User
 
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default DateTime Typed Paramater on Parameterized Query

Hi,
I'm working on a web service for my collage project, and I'm desperately need your help.
this is some of my code i'm working on:

Public Function GetGAFlightSchedule(ByVal ScheduleDate As DateTime) As DataSet
Dim adapter As New SqlDataAdapter("SELECT Schedule.Flight_Number, Route.Origin, Route.Destination, Route.Departure, Route.Arrival FROM Schedule, Route WHERE Schedule.Flight_Number=Route.Flight_Number AND Schedule_Date=@Schedule_Date, con)
adapter.SelectCommand.Parameters.Add("@Schedule_Da te", SqlDbType.DateTime)
adapter.SelectCommand.Parameters("@Origin").Value = ScheduleDate

the code isn't working. where did i do wrong? it really get on my nerves.... your helps are greatly appreciated.
thx alot! ^^
 
Old July 25th, 2007, 08:57 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hi there.. you are not giving enough information.. what didn't work?? what happend??

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling Parameterized Update Query from C# fcortes C# 6 July 11th, 2007 08:47 AM
Parameterized Query asters VB.NET 2002/2003 Basics 5 July 9th, 2007 12:08 PM
Datetime to Date during Query krashed SQL Language 1 April 4th, 2006 11:59 PM
How can i use typed dataset with Join Sql query? vijaykumartaduri BOOK: Professional Crystal Reports for VS.NET 0 November 10th, 2005 04:02 AM
Sql Parameterized query, @ or ? Pauline BOOK: Beginning ASP.NET 1.0 2 January 26th, 2005 11:33 AM





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