subsonic

subsonic with webservice

I am trying to get subsonic to run work in a webservice I am not sure how to return the data. I only get the word Object in my results when It return anything instead of values. What am I missing? <WebMethod(Description:="Method to retrieveCptCode subsonic List")> _ Public Function GetSubCptCodes() As CPTCodeCollection Dim coll A...

Why can't I save a database transaction using SubSonic?

I have a table called jobs and I can get data out of the table with no problems but saving is causing issues. Here is the code and the error: Job job = new Job(JobId); job.Name = txtName.Text; job.SimsCustCode = txtSimsCustCode.Text; job.Mode = cboMode.Text; job.Interval = Convert.ToInt32(nudI...

Security considerations for intranet developer making public facing website?

I have alot of experience writing internal Intranet applications, but very little when it comes to writing public facing web applications where it is likely that a certain percentage of people will try and be malicious. The app is written with MVC.net, JQuery and Subsonic. What steps can I take to project my application, to make it rea...

Where is t4 templates for subsonic 2.2?

I've downloaded subsonic 2.2 source code,and i can't found the t4 templates in all projects Anyone can tell me? ...

Rename fields in SubSonic select statement

Is there a way to rename fields when executing a select statement in SubSonic? I am using the ExecuteTypedList<MyClass> method to fill my List<MyClass> object but the properties of MyClass are not all the same as the column names from the DB table. In SQL I can do select col1 as 'FirstColumn', col2 as 'SecondColumn' from MyTable, is ther...

Subsonic Performance, can it handle up to 1million song information?

I did notice the statement on Subsonics page that it can handle 100000+ files, but we would need to handle information for up to 1 million songs. Do we know what the 100000 limitation is from -- is it based on database speed, hard drive capacity, or is that simply all that it has been tested with? Could you share some proven examples ab...

isNull(col, '')

How to write queries to do the followings in SubSonic/C#? select isNull(col, someDefaultValue) from table select x = case when (condition) then col1 else col2 end from table ...

What am i missing... windows forms binding with subsonic

I have a form with a list box and a few text boxes, when the user selects an item from the list box, i need the approptiate information to show up in the txt boxes and allow the user to edit it. Here's my form Load event: Private prt As New DataAccess.Part Private Sub Form_Load(ByVal sender As System.Object, ByVal e As System.EventArg...

How to use "one to many" relations in SubSonic

What are the ways to tell SubSonic about the relationship (only foreign keys? Or other methods too)? If I have (for example) a team object with related team members ** how do I access and update the team members from the team ** how do I update the team members? Does saving the team object saves the team members changes ** How do I a...

Query with SUM using SubSonic

Hi, I'm new to Subsonic, I want to ask how to query with SUM? I know how to query for where condition such as below: Query qryCurOpcode = Station.CreateQuery() .WHERE("PRODLINE=PIECERATE_prodline") .AND("STATIONID=STNID") .AND("SHIFT=PIECERATE_shift"); IDataReader rdrCurOpcode = qryCurOpcode.ExecuteReader(); while (rdrCu...

SubSonic doesn't map stored procedure in packages

Ive Used Subsonic for MSSQL and works wonderfull!!!! Does anyone know whats with oracle's SPS in Packages? Please help. need to deliver a func verry soon. ...

How to build a dynamic query with SubSonic

I need to build (and run) a query based on different of conditions. When I was building a literal SQL to run, this would mean concatenating strings to build the SQL dynamically. How would I do it with SubSonic? If for example I need to add a WHERE clause in some case and an ORDER BY in other cases. How would the code to build and run th...

Subsonic Three (3) CreatedBy fields not updating

Using Subsonic 3 I have the fields: o CreatedOn (datetime) o CreatedBy (nvarchar(50)) o ModifiedOn (datetime) o ModifiedBy (nvarchar(50)) When I add data to my table it is not adding data to these columns. Am I missing something? ...

How Can I write query in Subsonic for Subqueires.

Hi, How can I do the following query in subsonic 2.2 select Table1.Id, Table1.Name, Table1.Age from Table1 where Table1.Id = ( select Max(T.Id) from Table1 T Where T.Age = 20 ) Can one can provide me with example. Thanks. nRk ...

Generate SubSonic migration code from existing db?

In Rob Conery's post about SubSonic Migrations written in October 2007 he mentions in the 'Left To Do' list that: I want to be able to “Reverse Engineer” an existing DB into a migration file I am looking at introducing versioning control for an existing database with a lot tables, and SubSonic looks like the tool for me, but I'...

SQL Server Error: "Cannot use empty object or column names"

I get the following error: Cannot use empty object or column names. Use a single space if necessary. Msg 1038, Level 15, State 3, Line 1 and the query command looks like: SELECT TOP 100 PERCENT [].[cms_page].[pa_id], [].[cms_page].[pa_key], [].[cms_page].[pa_title], [].[cms_page].[pa_keywords], [].[cms_page].[pa_description],...

Query objects from a Many to Many look-up table

I have Master1 and Sub1 and a another called Master1Sub1_Map which contains foreign keys to the Master1 and Sub1 objects. There are multiple ID's from Sub1 that are associated with a single id in Master1. If I want to see all the Sub1 records that are assigned to a specific Master1.ID how do I go about doing that with the SubSonic obje...

SubSonic: BeforeDelete

SubSonic provides the overrideable methods BeforeUpdate and BeforeInsert for doing validation. Is there a way to hook into the BeforeDelete event, if such a thing even exists? ...

ExecuteJoinedDataSet but with Where()

I did some searching and see that ExecuteJoinedDataSet will not work with the Where clause in 2.1. If I want to query a table with WHERE, but want the FK objects values to be bindable is the easiest way to just create a custom class(my table has tons of FK references). ...

Easy way to see SQL generated by ActiveRecord.Save()?

SubSonic 2.1 I have an ActiveRecord object. When I call its Save() method, is there an easy way for me to seen the generated SQL, say in the Visual Studio debugger? Running SQL Profiler is not an option. Thanks. ...