in

Browse by Tags

  • Query().NOT_IN() erroring with 'Must declare the scalar variable "@notIn1"'

    The above error is returned when NOT_IN is called. IN works using the same ArrayList and query object, i.e.: if (inSpec) { qry = new Query(MathcadValue.Schema).IN("Id", inList); } else { qry = new Query(MathcadValue.Schema).NOT_IN("Id", inList); } mvColl.LoadAndCloseReader(qry.ExecuteReader...
    Posted to Version 2.1 - Pakala (Forum) by del on 05-13-2008
  • ASP.NET MVC Paged Collection Question

    I am trying to use strongly typed viewdata with my MVC and I need to page through my collection, I am very new to subsonic and I have only been able to find my paged collection back as a IDataReader and I would like it back as a collection. Here is my typed ViewData class: Public Class CustomerControllerViewData...
    Posted to Code Discussion (Forum) by alivemedia on 05-12-2008
  • How to get data from multiple tables using subsonic.query

    i want data from more then one table so please guide howi use query to fetch data and show in the repeater. e.g. select table1.id, table2.name from table1,table2 where table2.id=table1.id how can i apply this sql query using subsonic.query thx
    Posted to Code Discussion (Forum) by atifarif on 04-30-2008
  • New Query tool: can I alias a table so I can join the same table twice

    I am evaluating the new query tool. I think it is a great enhancement to the product. I didn't see a way to alias the table I join to. I have a case where a table A has two columns (1,2) that are foreign keys to another table B. I need to select a column (B.1) from the primary table foreach join...
    Posted to Version 2.1 - Pakala (Forum) by jasonjmitchell on 04-10-2008
  • Views & Query

    Is it just me or does it seem like it takes more code to query a View compared to a table in SubSonic? Can this be shorted up via the controller template? For instance with a View I have to create the query create the collection View.fetchbyquery(query) collection.LoadAndCloseReader() return the collection...
    Posted to Version 2.1 - Pakala (Forum) by Chris Thames on 03-31-2008
  • Re: Field Concatenation

    Thanks kbradl1! The Select command didn't work for me(Incorrect syntax near '*') but I was able to get the QueryCommand to work. This leads me to a new challenge! I am working on a grid view control and I am trying to enable paging. How would I do this in the QueryCommand?
    Posted to Version 2.1 - Pakala (Forum) by vzaffiro on 03-25-2008
  • Re: Field Concatenation

    This might work, although I haven't tested it: VB: Dim sel As New [Select](DataService.Provider, New String() {"*", "Firstname + ' ' + Lastname As Fullname"}) However this is the way I would do it: VB: Dim fquery As New QueryCommand("Select *, Firstname + ‘ ‘ + lastname...
    Posted to Version 2.1 - Pakala (Forum) by kbradl1 on 03-25-2008
  • How to Get Request.QueryString() in Subsonic

    I am writing a Page that pulls in data from a view and I am passing a postID in the url string. I am wondering how to pull the PostID out of the url string using subsonic and display data from that call. I can easily do this in a sql data adapter but since we decided to go full on subsonic I hoping there...
    Posted to Code Discussion (Forum) by mikedopp on 02-22-2008
  • MVC Controller Query/List exception

    I'm using the MVC templates and SubSonic 2.0.3. When trying to get a collection using the controller, I get: "SqlException was unhandled by user code; Incorrect syntax near the keyword 'FROM'." If I inspect the sql using GetSql() on the query, I get the following: "/* GetSelectSql...
    Posted to Code Discussion (Forum) by birderrob on 02-16-2008
  • Retrieving records with Null values

    I'm trying to do a query that will retrieve records that have a null value in one of the columns. The GetSQL shows the IS NULL clause, but the Inspect leaves it out (and the query doesn't work). Dim qry As New SubSonic.Query(Views.VInfusionEpisode) With qry .WHERE( "fk_providers" ,...
    Posted to Code Discussion (Forum) by sbguy on 02-05-2008
Page 1 of 2 (17 items) 1 2 Next >