-
Hi, I'm running SubSonic against a MySQL db, and having some trouble with the querying code. 1. Given this query: Query qry = Category.CreateQuery().WHERE("ParentCategoryID", DBNull.Value); qry.GetSql() returns "SELECT * FROM `category`;" which is incorrect. I also get zero rows...
-
I'm using 2.1 and am updating a record. When I run the update I get the error 'Incorrect syntax near the keyword WHERE'. I've seen this is a bug and I've applied the patch to the SQL2005 generator, regenerated the code and got the same error. I even tried what was referenced here...
-
code: StoredProcedure sp = new StoredProcedure("UserTestSP"); sp.Command.AddOutputParameter("@count", DbType.Int32); GvTest.DataSource = sp.GetReader() GvTest.DataBind(); int count = Convert.ToInt32(sp.OutputValues[0]); Response.Write(count); count : can't get value? is a buy...
-
bug one : file at : SubSonic --ActiveRecord--StoredProcedure.cs when i used at page: GvTest.DataSource = SPs.UserTestSP(1).GetReader(); GvTest.DataBind(); run it, it give me a error, later i find, public IDataReader GetReader() { IDataReader result = DataService.GetReader(_cmd); OutputValues = _cmd.OutputValues;...
-
Im using subsonic 2.1 I have 2 tables and i am joining them with 2 columns How do i do inner join in select query. to be more precise how do i do same with subsonic what im doing in below query. select * from table1 t1 inner join table2 t2 on t1.col1 = t2.col1 and t1.col2 = t2.col2 thanks. SP
-
Edit: Ok, aparently it's ain't a bug, just the way it's supposed to work! You build the sql first and only after that you provide the parameters! Running the code below generates the following Exception: Must declare the scalar variable "@ID0". ---------------------------------...
-
When i try to update i get error: can not convert guid to string can not convert bool to bit can not convert datetime to string I use this query: bool Approved = false; Update up = new Update(Tables.TbNewsComment) .Set(TbNewsComment.Columns.NewsCommentApproved).EqualTo(Approved); if (Approved) { up ...
-
Raised an issue on codeplex. We'll see what happens. http://www.codeplex.com/subsonic/WorkItem/View.aspx?WorkItemId=18074
-
I have just tried to use the Script Data option in SubStage to generate a script for one of the tables in my SQL Server 2005 database. Apart from there not being an obvious option to just do one table, and the output file being hidden amongst all of the generated DAL classes (it would have been nice...
-
I would say so as I fully expected my partial class properties to get popualted. I guess it depends on whether this scenario was already considered. If so I'd assume there's a reason for not matching properties and using SubSonic's default way (ie performance). At any rate it's worth...