Questions tagged [subsonic2.2]

82 questions
1
vote
1 answer

SubSonic: Selecting all columns with an aggregate

How would you best handle constructing this SQL statement in SubSonic? SELECT ac.* , SUM(pt.amount) AS totalPoints FROM tbl_account AS ac INNER JOIN tbl_pointTracking AS pt ON ac.id = pt.accountID GROUP BY pt.accountID ORDER BY…
StephenPAdams
  • 2,797
  • 2
  • 30
  • 49
1
vote
2 answers

Subsonic query: issue with the produced query

I'm having a problem with subsonic query. The deal is, I have a view and I want to query it's data to produce something like the following SQL statement: select * from myView where (col1 like '%a%' or col2 like '%a%' or col3 like '%a%') and col4…
smartins
  • 11
  • 1
1
vote
1 answer

SubSonic OpenExpression/CloseExpression

Hey All! I'm trying to construct a query that is something like this: Where column = "value" AND column2 = "value" AND (column3 = "value" OR column4 = "value") I have this code: return new Select() .From(LessonChallenge.Schema) …
StephenPAdams
  • 2,797
  • 2
  • 30
  • 49
1
vote
1 answer

Subsonic 2.2 & Sqlite

I've tried to use Subsonic 2.2 & System.Data.Sqlite.Dll latest version (1.65.0), in my project. and recevied an error message, which gave me the idea subsonic got a problem with the sqilte provider. I've switched to it's previous version, 1.60.0 and…
user196199
1
vote
1 answer

Subsonic 2.2 InnerJoin Across Two Databases

Can anyone provide an example of how to join across two schemas using subsonic 2.2. This doesn't work: SqlQuery qu = new Select("*") .From(NorthwindLeads.Lead.Schema) …
Matty
  • 11
  • 1
1
vote
1 answer

Update a column value based on another column value with SubSonic 2.1/2.2

I have the following code using SubSonic 2.1/2.2 SubSonic.Update() .Set() .EqualTo(). Where(condition...).Execute() I would like to change it to update "column A" with the value of "column B" + 1. How can I do it…
Ron Harlev
  • 16,227
  • 24
  • 89
  • 132
1
vote
2 answers

Subsonic 3 equivalent of Subsonic 2 SetColumnValue and GetColumnValue ActiveRecord

I am converting a project from Subsonic Version 2.2 to 3.0.0.3 and have been unable to find the equivalent functionality of SetColumnValue and GetColumnValue that version 2 has. What does version 3 have that is equivalent to these?
NRP DOC
  • 11
  • 1
1
vote
1 answer

SubSonic DAL, assembly not found?

I have generated a DAL layer with Subsonic2.2 for a .NET4.0 application, using c# and mysql. Yet when I use a Collection, i have this exception on this line: AnagraficaCategorieCollection a = new AnagraficaCategorieCollection().Load(); telling me…
Cranio
  • 9,647
  • 4
  • 35
  • 55
0
votes
3 answers

Subsonic Query Condition A AND ((Condition B AND Condition C) OR (Condition D AND Condition E AND Condition F)

I'm close to pulling out the rest of my hair because I cannot figure out how to do the following T-SQL Query in SubSonic 2.2: SELECT SalesRep, Location, InvoiceNumber, PONumber, POReceivedOn, SurgeryDate, Surgeon FROM …
AJ Tatum
  • 653
  • 2
  • 15
  • 35
0
votes
5 answers

SubSonic Schema Errors

I am running VS2008 in .net 3.5 and trying to get SubSonic 2.2 running. My database is called Test, the table in the DB is called TestTable. It is being run on SQL Server 2005. I get the following "warnings": Could not find schema information for…
Mike Friday
0
votes
1 answer

Accept / Cancel changes in Subsonic 2.2

I have a .NET 2.0 Winforms app (and Subsonic 2.2), where I have a DataGridView and few controls in a panel, both are bound to a BindingSource whose datasource is a Subsonic ActiveRecord collection. When a user selects a row in grid, the…
sanar
  • 437
  • 9
  • 22
0
votes
1 answer

How to group "And" & "Or" in a single query statement using subsonic 2x

I am having some trouble in converting the following SELECT * FROM foo f WHERE (f.name = 'name' AND f.date = '1980/02/2001') OR (f.name = 'another name' AND f.date = '1990/02/2001') to new…
GeForce
  • 90
  • 1
  • 8
0
votes
1 answer

Batch insert to different provider using subsonic 2.2

I have an IEnumerable and I would like to do a batch insert (240,000+ records). I've been perusing the forums and SO and I haven't been able to come up with something that works... The other catch is that I need to be able to specify a different…
tjans
  • 1,503
  • 2
  • 16
  • 26
0
votes
1 answer

Subsonic 2.2 doesn't support .NET Framework 4.0 Windows Application?

I am using .net framework 4.0 and after adding reference of subsonic 2.2 dll. Once I compiled the reference disappeared, I google it, I came to know it uses system.web.dll. I have compiled subsonic2.2 source code with framework4.0 and try to add…
Rana blogs
  • 42
  • 1
0
votes
2 answers

Save image to Sql Server image to image field using C# and Subsonic

In an ASP.NET app (using framework 2.0), and the ORM for this application is Subsonic 2.2, which I'm working with for the first time. I have an image which I've retrieved from a URL, and I have an HttpWebresponse object, which I've converted to an…
draconis
  • 599
  • 1
  • 5
  • 16