Using LINQ And Context Acts Like It Is In Transaction.

Apr 18, 2008

I am using VS2008 Team Edition under Vista with SQL Compact 3.5

I am trying to develop an app using C# and LINQ and take advantage of the Sync services. The problem is that everything seems to work but nothing ever really gets saved out to the local .sdf file. I have all the SQL commands logged to the the console and they seem fine. I have SubmitChanges() wrapped in a try/catch and no exceptions are thrown. When I requery the context for the data the new added rows do show up. If while the application is open, I go to VS2008 and query the file I just added to, I don't see the new rows. If I exit the application and try I still don't see them. If I restart the application the rows show up. If I exit the app and refresh the connection to the .sdf file in VS and then restart the application the inserted records are gone.

They act exactly as if when I made my connection to the database I started a transaction (which I didn't do, at least no explicitly) that I never commit. Did I miss some basic point about opening a connection to SQL compact?

I connect when the app launches and I store the context in a member variable of my class which doesn't go out of scope until the application quits. I tried creating a new connection in a local method right around the call to SubmitChanges() but it behaved the same.

Below is the console output from adding the record and then updating it (two calls to SubmitChanges() )



INSERT INTO [Milestone]([Milestone_Key], [MilestoneType_Key], [Inspection_Key], [MilestoneDate], [Description], [RowVersion], [ModifiedOn], [ModifiedBy_Key], [CreationDate])

VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8)

-- @p0: Input Guid (Size = 0; Prec = 0; Scale = 0) [74ec904a-0c8d-46e5-8bea-af066d2c2f79]

-- @p1: Input Int32 (Size = 0; Prec = 0; Scale = 0) [3]

-- @p2: Input Guid (Size = 0; Prec = 0; Scale = 0) [57702e12-e0d8-487e-bf80-8066bf9ebdd5]

-- @p3: Input DateTime (Size = 0; Prec = 0; Scale = 0) [4/17/2008 6:50:52 PM]

-- @p4: Input String (Size = 0; Prec = 0; Scale = 0) []

-- @p5: Input Binary (Size = 8; Prec = 0; Scale = 0) []

-- @p6: Input DateTime (Size = 0; Prec = 0; Scale = 0) [4/17/2008 6:50:52 PM]

-- @p7: Input Int32 (Size = 0; Prec = 0; Scale = 0) [0]

-- @p8: Input Int64 (Size = 0; Prec = 0; Scale = 0) [0]

-- Context: SqlProvider(SqlCE) Model: AttributedMetaModel Build: 3.5.21022.8

SELECT [t0].[Milestone_Key], [t0].[MilestoneType_Key], [t0].[Inspection_Key], [t0].[MilestoneDate], [t0].[Description], [t0].[RowVersion], [t0].[ModifiedOn], [t0].[ModifiedBy_Key], [t0].[CreationDate]

FROM [Milestone] AS [t0]

WHERE [t0].[Inspection_Key] = @p0

ORDER BY [t0].[MilestoneDate]

-- @p0: Input Guid (Size = 0; Prec = 0; Scale = 0) [57702e12-e0d8-487e-bf80-8066bf9ebdd5]

-- Context: SqlProvider(SqlCE) Model: AttributedMetaModel Build: 3.5.21022.8

The thread 0x2604 has exited with code 0 (0x0).

UPDATE [Milestone]

SET [Description] = @p7

WHERE ([Milestone_Key] = @p0) AND ([MilestoneType_Key] = @p1) AND ([Inspection_Key] = @p2) AND ([MilestoneDate] = @p3) AND ([RowVersion] IS NULL) AND ([ModifiedOn] = @p4) AND ([ModifiedBy_Key] = @p5) AND ([CreationDate] = @p6)

-- @p0: Input Guid (Size = 0; Prec = 0; Scale = 0) [74ec904a-0c8d-46e5-8bea-af066d2c2f79]

-- @p1: Input Int32 (Size = 0; Prec = 0; Scale = 0) [3]

-- @p2: Input Guid (Size = 0; Prec = 0; Scale = 0) [57702e12-e0d8-487e-bf80-8066bf9ebdd5]

-- @p3: Input DateTime (Size = 0; Prec = 0; Scale = 0) [4/17/2008 6:50:52 PM]

-- @p4: Input DateTime (Size = 0; Prec = 0; Scale = 0) [4/17/2008 6:50:52 PM]

-- @p5: Input Int32 (Size = 0; Prec = 0; Scale = 0) [0]

-- @p6: Input Int64 (Size = 0; Prec = 0; Scale = 0) [0]

-- @p7: Input String (Size = 0; Prec = 0; Scale = 0) [added a record then changed a field and re-saved.]

-- Context: SqlProvider(SqlCE) Model: AttributedMetaModel Build: 3.5.21022.8

View 1 Replies


ADVERTISEMENT

Context Connection Transaction

Feb 24, 2006

Hello Guys,

I need some some clarifications on how Context connections and transactions inter operate in CLR.

The context connection allows for ADO objects to be " running in the same transaction space". So the association to the current transaction is implied. So as long as I set for example my SqlCommand to use the context connection I am going to be running under the same transaction.

SqlConnection sqlConn = new SqlConnection("context connection=true");
SqlCommand sqlComm = new SqlCommand("EXEC myCommand", sqlConn);

I guess my ambiguity comes from the fact that the Transaction is not specifically specified.

In addition what happens upon a trigger that for example watches and insert on a table? If the insert occurs under a transaction, I would assume that I will be also picking up that transaction in the CRL Trigger, thus the whole operation would seem atomic.

Thank you,

Lubomir

View 1 Replies View Related

DTC - Transaction Context In Use By Another Session

May 5, 2006

Hi

I have a master package that executes a series of sub packages. The master package is run from a SQL Agent job. The packages are reading from and writing to two databases on the same instance of SQL Server 2005.

If I set the Execute Package Tasks for the sub packages without any precedence constraints between them and set TransactionOption = Required at the master package level (and supported from there downwards) I get the following errors.

The event log shows me:

The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x8004D00A "Unable to enlist in the transaction.".

Running a SQL Profiler trace shows me:

Error: 3910, Severity: 16, State: 2
Transaction context in use by another session.

This problem is well documented and seems to go back to DTS in SQL Server 7.0 . . . see http://support.microsoft.com/?scid=kb;en-us;279857&spid=2852&sid=150

I can get round it by setting precedence between the sub packages - making them run one at a time solves the problem. But then we don't get the performance benefits of running the packages concurrently. Does anyone have any other solutions.

TIA . . . Ed

View 6 Replies View Related

Transaction Context In Use By Another Session.

Jun 6, 2006

I'm having a SP1 on server A.

This procedure has a begin trans and a commit. In this procedure i'm inserting data into tables. This data is provided by an extrenal app in staging tables. On the tables i'm inserting data on i'm having triggers that again are starting a SP2. I'm using a cursor on the inserted table to achieve this. The SP2 only insert a record on a table that is on a linked server.

For testing reasons at this moment this is my dev machine too.

The error 'Trans ... ' pops up ....

Any suggestions ..



Kind Regards, Harry

View 5 Replies View Related

Transaction Context In Use By Another Session Error

May 12, 2006

I have written a stored procedure that calls a C# class.  The sp is called by a trigger on table A.  The class has 2 methods.  Method 1 is the main call from the stored procedure.  Inside it, it sets a connection to the db.  Then it calls another private method which has it's own connection and returns a dataset so that I can close that connection by the end of the method.  When I execute the sp from within sql management studio, it runs just fine.  But when being called from the trigger, I get the "transaction context in use by another session error" error.  I read that I needed to wrap my 2nd connection in ...
using (new TransactionScope(TransactionScopeOption.Suppress)){  open conn here, do work, etc.}
I've tried that and I still get the same error from the trigger.  Anyone know what else I can try?  Thanks.

View 9 Replies View Related

Transaction Context In User By Another Session

Feb 29, 2008

Im using SQL Server 2000 sp2 for ASP application on windows server 2003 sp2.

Im getting an error 'Transaction context in user by another session'.

I have not at all used BEGINTRANS / committrans , No Insert / Update statements.
the kind of SQL statements that i was using in that page load is only "SELECT statements"

Can any one give me answer how to get rid of this. I have used only one connection object. and result set as a loop containing few more result sets. But I m sure they are so complex statements to block the SQL server transactions.



Awaiting for reply..................

View 1 Replies View Related

Error: Transaction Context In Use By Another Session

Oct 30, 2006

I am programming in ASP and SQL server.

I am using this tag <%Transaction=Required%> to do the transaction.

And it woks well, but the problem is that sometimes I get this error: "transaction context in use by another session"...

It's really weird because it only happens in the same row. If choose this row to be shown I get that message, but if choose another row I get result with no error. And if take out the tag <%Transaction... I don't get any error.

I've searched in other forums about this error, and one guy claims that there is a bug in the MTS and there is no way to solve the problem.

View 2 Replies View Related

Transaction Context In Use By Another Session Error In C# Sp From Trigger

May 12, 2006

I have a c# stored procedure that is being called from a trigger. When I execute it from management studio, it works just fine. But, when I update a record in the table that has the trigger that calls the sp, I get the error "transaction context in use by another session error". I've tried a few of the "fixes" that I found through searching, but so far nothing seems to work. What I've tried so far is...

Removing the transaction from my code
making sure my code is only using 1 connection
setting XACT_ABORT ON

Any other ideas? Thanks.

View 1 Replies View Related

Is The Transaction Context Available Within A 'called' Stored Procedure For A Transaction That Was Started In Parent Stored Procedure?

Mar 31, 2008

I have  a stored procedure 'ChangeUser' in which there is a call to another stored procedure 'LogChange'. The transaction is started in 'ChangeUser'. and the last statement in the transaction is 'EXEC LogChange @p1, @p2'. My questions is if it would be correct to check in 'LogChange' the following about this transaction: 'IF @@trancount >0 BEGIN Rollback tran' END Else BEGIN Commit END.
 Any help on this would be appreciated.

View 1 Replies View Related

Linked Server Exec Stored Procdure Results In Transaction Context In Use By Another Session.

Nov 3, 2005

I am using sql 2005 beta

View 23 Replies View Related

Error 8525: Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

May 31, 2008

Hi All

I'm getting this when executing the code below. Going from W2K/SQL2k SP4 to XP/SQL2k SP4 over a dial-up link.

If I take away the begin tran and commit it works, but of course, if one statement fails I want a rollback. I'm executing this from a Delphi app, but I get the same from Qry Analyser.

I've tried both with and without the Set XACT . . ., and also tried with Set Implicit_Transactions off.

set XACT_ABORT ON
Begin distributed Tran
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TRANSACTIONMAIN
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.TRANSACTIONMAIN
set REPFLAG = 0 where REPFLAG = 1 and DONE = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.WBENTRY
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.WBENTRY
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.FIXED
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.FIXED
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.ALTCHARGE
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.ALTCHARGE
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TSAUDIT
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.TSAUDIT
set REPFLAG = 0 where REPFLAG = 1
COMMIT TRAN


It's got me stumped, so any ideas gratefully received.Thx

View 1 Replies View Related

SSIS, Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

Feb 22, 2007

I have a design a SSIS Package for ETL Process. In my package i have to read the data from the tables and then insert into the another table of same structure.

for reading the data i have write the Dynamic TSQL based on some condition and based on that it is using 25 different function to populate the data into different 25 column. Tsql returning correct data and is working fine in Enterprise manager. But in my SSIS package it show me time out ERROR.

I have increase and decrease the time to catch the error but it is still there i have tried to set 0 for commandout Properties.

if i'm using the 0 for commandtime out then i'm getting the Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.

and

Failed to open a fastload rowset for "[dbo].[P@@#$%$%%%]". Check that the object exists in the database.

Please help me it's very urgent.

View 3 Replies View Related

Max With LINQ

Jan 8, 2008

Hello!
I try to get a list of ConditionsVersion where Version is MAX for each ConditionsVersion.
I tried something like this (as seen on http://msdn2.microsoft.com/en-us/vcsharp/aa336747.aspx#maxGrouped):
 
1 List<ConditionsVersion> list = (from cv in ConditionsVersions2 group cv by cv.FKConditions into cv3 select new { 4 PKConditions = cv.PKConditions,5 FKConditions = cv.FKConditions,6 MaxVersion = cv.GroupBy.Max(cv => cv.Version)7 CTimestamp = cv.Timestamp8 }).ToList(); 

But it doesn't work. It would be great if someone knows why.
Thank you!   

View 2 Replies View Related

LINQ - What Do You THINK?

Nov 2, 2007

Well, just played a little bit with that new thing from Microsoft. Genius! Microsoft presented that step backwards as a step forward.

Say good bye to the 3-tier architecture, now any programmer, after 1 week training, will be able to put SELECT * into the source code. No more stored procedures and logic on a server. No more ugly WHERE clauses. Just SELECT * and pass all records in a loop :)

When I looked at the queries, generated by LINQ in SQL profiler, I noticed that they are generated automatically using the same pattern. It is obvious, of course, but now it would be really difficult to trace a problematic query back to the C# code. All updates to table X will look like as identical twins!

On the other side, it is not so bad. We will have soon a lot of projects, failing when they go to the production and face the real volumes of data. And a long queue of companies, crying and asking to save them. Perfect “job security�. Please, use LINQ! Port all your code to LINQ immediately (Laughing demonically like Dr. Evil)

Hm… a second thought, but what could we suggest to these companies, having performance problems with LINQ 3rd party applications, when there is no source code? Now we could at least modify some stored procedures, and with LINQ looks like the only recommendation could be “contact a developer of that application or buy more a powerful server�.

View 18 Replies View Related

LINQ To SQL

Apr 20, 2008

Is it possible to use LINQ to SQL with Report Services? If so, are there any examples, tutorials, etc.?

View 1 Replies View Related

Linq To Sql

May 28, 2008

Is Linq a feature of sql server 2008 ?
Or is it a feature of DOt net. Visual Studio 2008 ?

View 1 Replies View Related

Linq To Sql

May 28, 2008

Some say linq to sql leads to the death of stored procedures is it correct ?

View 4 Replies View Related

Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

Feb 6, 2007

I am getting this error  :Distributed transaction completed. Either enlist this session in a new
transaction or the NULL transaction. Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code. Exception Details:
System.Data.OleDb.OleDbException: Distributed transaction completed. Either
enlist this session in a new transaction or the NULL transaction.have anybody idea?!

View 1 Replies View Related

Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

Dec 22, 2006

i have a sequence container in my my sequence container i have a script task for drop the existing tables. This seq. container connected to another seq. container. all these are in for each loop container when i run the package it's work fine for 1st looop but it gives me error for second execution.

Message is like this:

Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.

View 8 Replies View Related

Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction. (HELP)

Jan 8, 2008

Hi,

i am getting this error "Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.".

my transations have been done using LINKED SERVER. when i manually call the store procedure from Server 1 it works but when i call it through Service broker it dosen't work and gives me this error.



Thanks in advance.


View 2 Replies View Related

Linq + Sql Server Everywhere = ?

Nov 8, 2006

Will Linq be compatible with Sql Server Everywhere without having to add additional plugins?

View 7 Replies View Related

LINQ To SQL Question ?

Dec 30, 2007

Hullo am using Asp.Net 3.5, I want to create a usercontrol that is supported to all projects to upload file into sqlserver,
the user just give the database connection string,
tablename, column name depending upon their need, here I develop the
code using LINQ technology.
I Write a class with simple format like below,
 
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.Linq;
 
/// <summary>
/// Summary description for FILE_MASTER_INSERT
/// </summary>
//namespace Linq2Sql_demo_doc
//{
   
    [System.Data.Linq.Mapping.Table(Name = "FILE_MASTER")]
 
    public partial class FILE_MASTER
    {
 
    string Tablename;
        public FILE_MASTER()
        {
            //
            // TODO: Add constructor logic here
            //
        }
        [System.Data.Linq.Mapping.Column(Name="filename")]
        public string FileName
        {
            get;
 
            set;
 
           
        }
 
        [System.Data.Linq.Mapping.Column(Name = "file_content")]
        public byte[] file_content
        {
            get;
 
            set;
 
 
        }
 
        [System.Data.Linq.Mapping.Column(Name = "file_id", IsPrimaryKey = true, IsDbGenerated = true, CanBeNull = false)]
       
        public int file_id
        {
            get;
            set;
 
        }
 
    }
 
    public class TestDB : DataContext
    {
 
        public Table<FILE_MASTER> FILE_MASTERs;
 
       //Initializing base class constructor
 
        public TestDB(string s) : base(s) { }
               
    }
 
 This
is working but, this is suitable only for single table, I expect
depending upon the user input automaticaly the tablename, column name
will change in the yellow block codes  .
Is there any way to update the tablename , columnname from any other class?
 
 
                  Thank you. Jeyaseelan  

View 1 Replies View Related

When IDENTITY_INSERT Is Set To OFF. -- LINQ

Jan 21, 2008

I'm new to ASP/VS/Linq and I'm having a small problem.
 I have one table setup in SQL Server Express 2005 through Visual Studio 2008.  The table name is "Users" and has three columns (accountID, userName, email).  AccountID is the primary key and set to auto incriment.  I've added a couple of records by hand and it works.
I have a single form with a button, a label, and two text boxes.  The button code is below.  After entering some fake data that does not already exist in the database and clicking the button I get this.
Cannot insert explicit value for identity column in table 'Users' when IDENTITY_INSERT is set to OFF.
I understand that it is trying to insert something into the accountID field but I don't understand why since I'm only providing a username and e-mail address to insert.
Your help is greatly appreciated.protected void Button1_Click(object sender, EventArgs e)
{
MyDatabaseDataContext db = new MyDatabaseDataContext();
var query = from u in db.Users
where u.email == txtEmail.Text
select u;

var count = query.Count();
if (count == 0)
{
//Create a new user object.
User newUser = new User();

newUser.username = txtUsername.Text;
newUser.email = txtEmail.Text;

//Add the user to the User table.
db.Users.InsertOnSubmit(newUser);
db.SubmitChanges();
}
else
{
Label1.Text = txtEmail.Text + " already exists in the database.";

 

View 6 Replies View Related

Linq ISingleResult

Jan 27, 2008

I have a supplier table with all my suppliers in it. I list them in a gridview. In this gridview, there is a link next to each record to an edit page. Below is the code for the edit page.  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim db As New orderLinqDataContext

Dim q = db.selectSupplierByID(Request.QueryString("id"))
Dim r As New System.Data.DataTable


txtFriend.Text = q(0).friendlyName
txtAdd1.Text = q(0).address1
txtAdd2.Text = q(0).address2
txtAdd3.Text = q(0).address3
txtAdd4.Text = q(0).address4
txtName.Text = q(0).supplierName
txtPhone.Text = q(0).phone
txtFax.Text = q(0).fax
txtPostCode.Text = q(0).postCode
End Sub
 This causes a runtime error. The error is: "The query results cannot be enumerated more than once." and the txtAdd1.text line is highlighted.
How am I supposed to get at the data so I can fill my text boxes this way?
Thanks,

View 5 Replies View Related

How To Do Where In Select In Linq?

Mar 7, 2008

var query =    from cloc in context.t_companylocs    where (cloc.ref_company == companyid) && (cloc.street == attributes["Street"])        && (cloc.postalcode == attributes["Postalcode"]) && (cloc.country in countrylist)        && (cloc.city in citylist)    select cloc; attributes is a Dictionary<string, string> object.countrylist and citylist are List<string> objects.Of course the syntax above doesn't work. It's basically what I'm trying to achieve :-)A quick and dirty solution would be to just drop the two where constraints containing the "where in" statement and handle that part in the following foreach() loop.Can anyone please explain how you would do it properly?regards 

View 1 Replies View Related

Linq To Sql -- Inserting

Mar 12, 2008

Does anyone have a good example of how to insert data using System.Data.Linq?  All the examples I've seen do something likeNorthwindDataContext db = new NorthwindDataContext();var x = new Product() {...}; db.Products.Add(x);db.SubmitChanges(); However I'm not seeing an Add method on System.Data.Linq.Table<T>.  Has this changed?  Could I somehow not be generating my model correctly?

View 2 Replies View Related

Linq To Sql Autogenerated Value

Mar 20, 2008

Hello,
How can I get autogenerated value of inserted item with linq to sql?
Thanks

View 2 Replies View Related

LINQ To SQL Using CONTAINS Or CONTAINSTABLE Possible?

May 12, 2008

I would like to use LINQ to generate a sql statement that does not use LIKE, but rather uses CONTAINS.  Is this possible?  If not, my second question is whether or not I can parameterize a SqlCommand that uses CONTAINS.  For example the following statement works just fine when I pass in the parameter via SqlCommand.Parameters.AddWithValue()SELECT * FROM [event] WHERE CONTAINS(comments, @searchTerm1)However, the following results in a variable not defined error.SELECT * FROM [event] WHERE (comments LIKE @searchTerm1)Any ideas?  Thanks for your help. 

View 1 Replies View Related

Linq-to-SQL And ASP:Repeater

May 25, 2008

Hi there,
In 2005.NET, if I used an asp:repeater, I would load the data from source and then manipulate it like so://load the data from source using a predefined connection and SQL Statement.private void LoadMyDataFromSource(){        try        {            connection.Open();            OleDbDataReader myReader = comm.ExecuteReader();                        rptrCatList.DataSource = myReader;            rptrCatList.DataBind();             myReader.Close();           }        finally        {            connection.Close();        }} //catch the ItemDataBound event and manipulate the data how I wish before it's loaded into the Repeater.protected void rptrCatList_ItemDataBound(object sender, RepeaterItemEventArgs e)      {        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)        {            int title = 4; //this is the index of the column I wish to manipulate((Label)e.Item.FindControl("lblTitle")).Text = ((IDataRecord)e.Item.DataItem).GetString(title) + ":"       }   }This would give me all the flexbility I ever needed. But now I wish to use linq and since the IDataRecord relies on dataReader sources, I cannot obtain the same flexbility. Can anyone point me in the right direction for obtaining the same kind of flexbility but using a linq-to-SQL dataContext? I wish to manipulate mostData that comes through from my source, so: //loadng the data in via my linq-to-sql context.private void LoadProducts()    {        MyDataContext db = new MyDataContext ();        var all = from p in db.Products_IncontinenceStandards                  where p.Product_Cat == "Category1"                  select p;        rpterCat.DataSource = all;        rpterCat.DataBind();    }This is where I get stuck because, even though I can still capture the ItemDataBound event since I have databound the Repeater to the linqSource, I can't access the individual fields (or this is what I think I can't do!), Does anyone know how to relate to this so I can create the same effect? Many Thanks,Nathan Channon
 

View 4 Replies View Related

SSIS Or LINQ

Apr 24, 2008

Hi,
I am beginner in SQL Server So excuse me if my question is stange for you.

I have to work on an sql server 2005. I need to extract data from this server in XML file. I have look at a lots of thing and I find two solutions:

- Use SSIS
- Create a home made solution with LINQ in c#

Clearly I do not have enouth experience to see with solution are the most available? Which are the things required to use those solutions?

Thanks

View 12 Replies View Related

Left Join Using Vb 9.0 And LINQ

Dec 2, 2007

Hi Guys,
I started working with linq and vb9.0 but i have a small problem i could feagure how to solve in c# but not in vb
I wanted to make left join or right join on vb 9.0 and linq is it possible or this is only c# feature ?
Waiting to hear from u guys,
Thanks
Softy

View 2 Replies View Related

Add Multimple Data Using LINQ

Dec 30, 2007

 Hello,          How do I add multiple data using LINQ, this one doesn't work. ...    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click        Dim i As Integer        For i = 0 To 3            Dim db As personalDataContext = New personalDataContext            Dim p As personal = New personal            p.name = "John"            p.number = "01213"            p.picture = "image/image.jpg"            db.personals.InsertOnSubmit(p)        Next    End Sub... cheers,imperialx 

View 1 Replies View Related

Multiple Where Predicates In Linq?

Jan 7, 2008

I'm just starting to dabble around with LINQ and all of the examples I've come across all have 1 where clause. Is this intentional such that we are supposed to build queries on top of queries or is there a method in which I can add multiple predicates to my 1 query? I'm sorry if this sounds like a stupid question, I've been googling it to death and reading the few manuals on LINQ but like I said, all of the examples have had 1 where predicate.
 
 
Thanks,
Chance 
 

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved