Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2008
    Posts
    49

    Unanswered: gridview queries help

    Hi,

    i am trying to make a query using gridview in visual studio 2005. i can use grid view to display tables and queries, but it wont display parameter value queries created in access.

    i have a reservation table, i want to enter date from and date to feilds and the return should be a reservation between those dates. any ideas?

    thanks

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    You can't use Access parameter queries; you have to make your own in the FE.
    George
    Home | Blog

  3. #3
    Join Date
    Feb 2008
    Posts
    49
    can i use the source code access gives?

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Sorry, what source code are we talking about?
    If you mean; "can I copy and paste the SQL from the query"; then to some extent, yes.

    However, the ASP will not know how to interpret your parameters (the prompts) so you will have to recode them in ASP.

    If you get stuck post back and I'll try and help.
    George
    Home | Blog

  5. #5
    Join Date
    Feb 2008
    Posts
    49
    yes i have tried to copy and paste the access sql source code but when i try to test the quer i get the an eerror. how can i tell asp.net to allow the parameters?

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Post the SQL and ASP code please.
    George
    Home | Blog

  7. #7
    Join Date
    Feb 2008
    Posts
    49
    PARAMETERS [Select date from] DateTime, [Select date to] DateTime, [Please select vehicle] Text ( 255 );
    SELECT Booking.[Booking ID], Booking.[Customer No], [Booking Details].[Vehicle Reg No], [Booking Details].[Date From], [Booking Details].[Date To], IIf(IsNull(VehicleBooked(-999,[Vehicle Reg No],[Date From],[Date To])),"Available","Not available") AS Availability
    FROM Booking INNER JOIN [Booking Details] ON Booking.[Booking ID] = [Booking Details].[Booking ID]
    WHERE ((([Booking Details].[Vehicle Reg No])=[Please select vehicle]) AND (([Booking Details].[Date From]) Between [Select date from] And [select date to])) OR ((([Booking Details].[Vehicle Reg No])=[Please select vehicle]) AND (([Booking Details].[Date To]) Between [Select date from] And [select date to]));

    this is the sql code, i dont have asp code as i was using gridview and could not create the query, thanks

  8. #8
    Join Date
    Jun 2009
    Posts
    1
    hey , I'm having trouble with a task assigned to me

    I have created a database on sql 2005 and I have made the connection with the sql datasource on the grid View .

    the problem is that I can't figure out how to show what every " Author " has in terms of " books ".

    I also can't figure out the appropriate code

    can u plzzzz help me , it's kinda urgent and I'm stuck !!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •