subsonic

SubSonic - Specifying DataProvider in a Select() function

I specify the dataprovider in a subsonic Select as in the following example: SubSonic.Select(Databases.BLLDB).From(Of Country)().ExecuteTypedList(Of Country)() yet I get the error: Invalid column name 'BLLDB' (it seems to be treating the dataprovider as a column string). Is this the correct syntax for specifying the dataprovider? T...

Inner Join with Subsonic

I am trying to display all records that match the last name entered into a textbox. This requires an INNER JOIN on the "volID" column because there are 2 tables. <asp:TextBox ID="lName" runat="server"></asp:TextBox> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="true" Visible="true"></asp:GridView> <asp:linkButton ID="...

Weird compilation error: An object reference is required for the non-static field, method, or property 'Veryau.Data.VUsergroup.System.get'

Hi, guys, I got a weird compilation error with subsonic and really need your helps. I'm using SQL Server 2005 and there are 30+ tables within this project. Subsonic works well with all other tables except the one named "v_Usergroups". Originally, there was no primary key defined in this table. Naturally, SS will not generate code for i...

Subsonic - How to use SQL Schema / Owner name as part of the namespace?

Hi there, I've just started using Subsonic 2.2 and so far very impressed - think it'll save me some serious coding time. Before I dive into using it full time though there is something bugging me that I'd like to sort out. In my current database (a SQL2008 db) I have split the tables, views, sps etc. up into separate chunks by schem...

Appending text to class names

Hi, Is there a way in Subsonic to append text to a generated class name? I know the appendWith property can be used in cases where the property name conflicts with type names, but is there a way to do it for every table regardless of the name? I've tried using the regular expression match and replace but that also appends the text to th...

Restrictions on Table Names

Are there any restrictions on the names of tables, or issues with certain names when working with SubSonic? I have table called 'Activity' and SubSonic doesn't seem to recognise it. When it was called 'Activities' it worked fine. Basically I am wanting to go with singular table names as a convention (and the other conventions as detaile...

How Do I return a DataTable from a SubSonic Query?

I'm trying to return a datatable from a query I have written in Subsonic (I'm just starting to learn it) - But can only return a DataSet? public DataTable GetAllCarTypes() { return new Query("tblCarType").ExecuteDataSet(); } I was hoping for .ExecuteDataTable()?? ...

SubSonic deployment and changing connectionstrings

I used Subsonic to build the DAL for one of my web applications. When I move it from my test server to the production server I change the connectionstring to point to the production datasource but the app still runs against the test DB. Is the connection information stored someplace else in addition to the Web.config? What are the best...

How should I create the subsonic 3.0 DB context class?

I'm new to SubSonic (of all flavours), but thought I might as well start with 3.0, because I'd like to use Linq, and I get the impression 3.0 is not that far away from release. I tried the alpha download .zip, but that seems pretty old and didn't singularize table class names, so I'm now running from the latest trunk SVN version (rev62)...

Where is the installation download for Subsonic 2.2?

Anyone know why I can't download the subsonic website development tool install anymore? It only shows a source download. Does anyone have a link to a full install download? ...

Querying with conditional where parameters

Before 2.1 I was able to write code like this (using the AddWhere): Query q = new Query(Search.Schema); q.BuildSelectCommand(); if (!String.IsNullOrEmpty(barcode)) q.AddWhere("Barcode", Comparison.Like, "%" + barcode.Trim() + "%"); if (!String.IsNullOrEmpty(fromDate)) q.AddWhere("FromDate", Comparison.GreaterOrEquals, fromDate); if ...

Subsonic 3 - Namespace hidden - Probably me!

Hi, It's Friday so I'm prob doing something stoopid here. In fact I'd put money on it. I'm playing around with Subsonic - got my feet happily into v2.2 but intrigued by v3 alpha Followed Rob's webcast, did as he did, watched T4 generate the code, went to use the new namespace and oh. No namespace. I can see the namespace Test.Data ...

Return A SQLDataReader Using SubSonic?

I am updating a web application and have decided to use SubSonic as it seems awesome and I want to learn it :) I'm trying to return a SQLDataReader from a method I already have and have done it like this public SqlDataReader GetAllCarTypes_dr() { return (SqlDataReader)new Query("tblCarType").ExecuteReader(); } Just checking this ...

subsonic.migrations and Oracle XE

Hello, Probably I'm doing something wrong but here it goes: I'm trying to create a database using subsonic.migrations in an OracleXE version 10.2.0.1.0. I have ODP v 10.2.0.2.20 installed. This is my app.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="SubSonicService" type="SubSon...

Subsonic change management process. Moving from test to prod.

Can I simply change the connection string to point from my Test DB to my Production DB when I go live with my website and DAL generated via Subsonic? When I try to push to my production servers the DAL still seems to be talking with my Test DB even though I have changed the connectionstring to a valid production DB that contains the id...

Server architecture and SubSonic.

Hello! Im trying to develop an server /client application. The server will be a bunch of webservices, the idea was to expose methods like: Company GetNewCompany(); //Creates an new Company Object Save(Company C); CompanyCollection GetCompany(Query q); Where Query object is part of Subsonic 2.1. But the problem is that SubSonic is not ...

Subsonic Query (ConditionA OR ConditionB) AND ConditionC

How do I build a query in Subsonic that of this format (ConditionA OR ConditionB) AND ConditionC Iv tried various approaches but I cant seem to get the desired result. Here is one thing i tired: Query q = Challenge.CreateQuery(); q.WHERE(Challenge.Columns.ChallengeeKey, playerKey) .OR(Challenge.Columns.ChallengerKey...

Where to submit Subsonic patch?

I just found an issue for Subsonic 2.1 that I created a patch for. Where do I go to submit that patch? ...

Subsonic REST 404 error

I'm trying to use the REST interface with Subsonic, but am not having any luck. I have this in the web.config <httpHandlers> <add type="SubSonic.WebUtility.RESTHandler, Subsonic" path=".xml" verb="*"/> </httpHandlers> and just to test that I have a version of Subsonic that has this functionality, this works fine (doesn't do any...

Using List<T> In a SubSonic Select Statement??

I was just wondering if you can do something like this List<string> maincolumns = new List<string>(); Select s = new Select(maincolumns) I know I can use a string[] but I need to build up the query and once I set the string[] I can't append columns :( ...