Search Results

Search found 52899 results on 2116 pages for 'ado net'.

Page 29/2116 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Retrive data from two tables in asp.net mvc using ADO.Net Entity Framework

    - by user192972
    Please read my question carefully and reply me. I have two tables as table1 and table2. In table1 i have columns as AddressID(Primary Key),Address1,Address2,City In table2 i have columns as ContactID(Primary Key),AddressID(Foriegn Key),Last Name,First Name. By using join operation i can retrive data from both the tables. I created a Model in my MVC Application.I can see both the tables in enitity editor. In the ViewData folder of my solution explorer i created two class as ContactViewData.cs and SLXRepository.cs In the ContactViewData.cs i have following code public IEnumerable<CONTACT> contacts { get; set; } In the SLXRepository.cs i have following code public IEnumerable<CONTACT> GetContacts() { var contact = ( from c in context.CONTACT join a in context.ADDRESS on c.ADDRESSID equals a.ADDRESSID select new { a.ADDRESS1, a.ADDRESS2, a.CITY, c.FIRSTNAME, c.LASTNAME } ); return contact; } I am getting the error in return type Cannot implicitly convert type 'System.Linq.IQueryable' to 'System.Collections.Generic.IEnumerable'. An explicit conversion exists (are you missing a cast?)

    Read the article

  • Why is TransactionScope using a distributed transaction when I am only using LinqToSql and Ado.Net

    - by Ian Ringrose
    We are having problems on one machine, with the error message: "MSDTC on server XXX is unavailable." The code is using a TransactionScope to wrap some LingToSql database code; there is also some raw Ado.net inside of the transaction. As only a single sql database (2005) is being accessed, why is a distributed transaction being used at all? (I don’t wish to know how to enable MSDTC, as the code needs to work on the server with their current setup)

    Read the article

  • ADO Access Tab button

    - by CREFLY
    Hello I moved my access apllication from DAO into ADO connection. It works better but I am encountering a problem when I enter a value in a form's field then I push the tab button the screen takes me to the first fields of the form and I lose my activecontrol which is the control of the field in which i enter the value. N.B.: If I clicked the cursor using the mouse after applying the value in the specified field, it works properly... Any help will highly appreciated

    Read the article

  • VB6 ADO Command to SQL Server

    - by Emtucifor
    I'm getting an inexplicable error with an ADO command in VB6 run against a SQL Server 2005 database. Here's some code to demonstrate the problem: Sub ADOCommand() Dim Conn As ADODB.Connection Dim Rs As ADODB.Recordset Dim Cmd As ADODB.Command Dim ErrorAlertID As Long Dim ErrorTime As Date Set Conn = New ADODB.Connection Conn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=database;Data Source=server" Conn.CursorLocation = adUseClient Conn.Open Set Rs = New ADODB.Recordset Rs.CursorType = adOpenStatic Rs.LockType = adLockReadOnly Set Cmd = New ADODB.Command With Cmd .Prepared = False .CommandText = "ErrorAlertCollect" .CommandType = adCmdStoredProc .NamedParameters = True .Parameters.Append .CreateParameter("@ErrorAlertID", adInteger, adParamOutput) .Parameters.Append .CreateParameter("@CreateTime", adDate, adParamOutput) Set .ActiveConnection = Conn Rs.Open Cmd ErrorAlertID = .Parameters("@ErrorAlertID").Value ErrorTime = .Parameters("@CreateTime").Value End With Debug.Print Rs.State ' Shows 0 - Closed Debug.Print Rs.RecordCount ' Of course this fails since the recordset is closed End Sub So this code was working not too long ago but now it's failing on the last line with the error: Run-time error '3704': Operation is not allowed when the object is closed Why is it closed? I just opened it and the SP returns rows. I ran a trace and this is what the ADO library is actually submitting to the server: declare @p1 int set @p1=1 declare @p2 datetime set @p2=''2010-04-22 15:31:07:770'' exec ErrorAlertCollect @ErrorAlertID=@p1 output,@CreateTime=@p2 output select @p1, @p2 Running this as a separate batch from my query editor yields: Msg 102, Level 15, State 1, Line 4 Incorrect syntax near '2010'. Of course there's an error. Look at the double single quotes in there. What the heck could be causing that? I tried using adDBDate and adDBTime as data types for the date parameter, and they give the same results. When I make the parameters adParamInputOutput, then I get this: declare @p1 int set @p1=default declare @p2 datetime set @p2=default exec ErrorAlertCollect @ErrorAlertID=@p1 output,@CreateTime=@p2 output select @p1, @p2 Running that as a separate batch yields: Msg 156, Level 15, State 1, Line 2 Incorrect syntax near the keyword 'default'. Msg 156, Level 15, State 1, Line 4 Incorrect syntax near the keyword 'default'. What the heck? SQL Server doesn't support this kind of syntax. You can only use the DEFAULT keyword in the actual SP execution statement. I should note that removing the extra single quotes from the above statement makes the SP run fine. ... Oh my. I just figured it out. I guess it's worth posting anyway.

    Read the article

  • Send shrink Command to Microsoft SQL Database file via Ado.net connection

    - by user287107
    How is it possible to execute a direct SQL command to an ADO.NET connected database? I want to send a DBCC SHRINKDATABASE to the SQL server, to compress the current datafile after a big deletion process. The function ObjectContext::CreateQuery returns a parser error after the DBCC command. Is there any other way to shrink the database file, or another way to send the SQL command directly to the SQL Server?

    Read the article

  • Compare Tables in different databases with ADO.Net 3.5

    - by MicMit
    I need to compare tables with the same names in different databases ( Sql Server 2008 ). How using C# code and ADO.Net to identify additions, deletions, updates. Is DataReader going to work in this scenario without stored procedures ? DataReader seems to be suitable for single database connection, or am I missing something ?

    Read the article

  • Association end is not mapped in ADO entity framework

    - by Sean
    I am just starting out with ADO.net Entity Framework I have mapped two tables together and receive the following error: Error 1 Error 11010: Association End 'OperatorAccess' is not mapped. E:\Visual Studio\projects\Brandi II\Brandi II\Hospitals.edmx 390 11 Brandi II Not sure what it is I am doing wrong

    Read the article

  • Updating gridview using ado.net entity framework

    - by Ravi
    Hello everyone, I am trying to figure out the best way of getting the record and update in to gridview using ado.net entity framework in C#. I need implement Next & Previous button in gridview and based on pagesize i want to navigate records using Next&Back button. Any one give simple example for this context.

    Read the article

  • Bonnie.NET Web Edition - Digital Signature form ASP.NET Web Pages

    Cassandra relseases on the we-coffee.com site a new version of Bonnie.NET. The Bonnie.NET Web Edition (http://www.we-coffee.com/bonnie/bonnieWeb.aspx). This new version permits to digitally sign texts, files and from data from an ASP.NET web-pages. It integrates the PKCS#7 standard to permits signature and co-signature of data both form client-side that from server side. To permits digital signature from ASP.NET web pages, Bonnie.NET Web Edition contains three asp.net server controls,...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Why are some seasoned ASP.NET developers defecting to Ruby on Rails?

    - by Tony_Henrich
    Once a while I hear some known ASP.NET developer declaring that they quit developing in .NET and moving to Ruby using Ruby in Rails. The problem is they don't mention exactly the reasons. They use words like RoR is 'easier', 'better' & 'faster'. That really doesn't say much to me. Anyone care to do faithful comparison using code samples, case studies ..etc or from personal experience in using both? Try to convince me to throw away all my years of learning C#, the .NET Framework using a powerful IDE (Visual Studio). Does RoR save you hours a week in development time? What are the major pain points in .NET that compels one to move away from it? This question is NOT about a pure RoR vs ASP.NET (MVC) comparison. It's about the compelling technical reasons (getting bored does not count!) to switch over after using a platform for several years and start with a new language and platform. (prefer this to be a wiki)

    Read the article

  • Relaunch: Help & Support Center

    - by Axinom
    More content, more interactivity, more social media: new help & support center for AxCMS.net collects all available information and news around AxCMS.net installation, deployment, development, and usage. Web: http://help.axcms.net/ Free download: http://www.AxCMS.net New chapter "Basic Concepts" is designed to provide users with an introduction and understanding of AxCMS.net. You will be introduced to the different AxCMS.net components, elements, use of built-in features such as categories and relations, deployment, workflow and security topics. This information forms a self-study guide as an introduction to AxCMS.net

    Read the article

  • I want to master ASP.NET - What concepts should I focus on/What concepts do you most value?

    - by Josh
    I start a job this summer doing work in ASP.NET 4 (C#). I plan on working with some legacy code as well as MVC. I want to get a running start. I have good understanding of HTML/CSS/Javascript, and pretty good understanding of C# itself, Design principles, Design Patterns, and understand masterpages, basic MVC2, and code behinds for web forms. In your opinion what aspects of ASP.NET are the most important to master for web applications? What do you value most in your usage of ASP.NET? Do you have a recommendation for understanding the internals of ASP.NET itself?

    Read the article

  • How to create Ror style Restful routing in Asp.net MVC Web Api

    - by Jas
    How to configure routing in asp.net web api, to that I can code for the following actions in my ApiController inherited class? |======================================================================================| |Http Verb| Path | Action | Used for | |======================================================================================| | GET | /photos | index | display a list of all photos | | GET | /photos/new | new | return an HTML form for creating a new photo | | POST | /photos/ | create | create a new photo | | GET | /photos/:id | show | display a specific photo | | GET | /photos/:id/edit | edit | return an HTML form for editing a photo | | PUT | /photos/:id | update | update a specific photo | | DELETE | /photos/:id | destroy | delete a specific photo |

    Read the article

  • How to insert selected rows value of Gridview into Database in .net

    - by MAS1
    I am Developing Windows Form Application in .Net, I want to insert selected rows value of Gridview into database. First Column of my GridView is Checkbox, when user check one or more checkbox from gridview, i want to insert values of respective rows into Database. In Web application i done this using DataKeyNames property of GridView.Want to know how to do it in Windows Form Application. I am using Visual Studio 2005

    Read the article

  • Render an asp.net control from a text string

    - by madness
    Hi All, I'm not sure if it is possible to render an asp.net control from a string. The string contains fragments of html code and I've tried rendering that string to a div tag with runat="server" set, asp panel contain, asp lalbel control and asp literal control. All of them doesn't render the asp control in that text to an actual control, it just come up as a string. I've tried adding <% % around them and it appears it doesn't like it. Thanks in advance.

    Read the article

  • asp.net mvc url routing

    - by progtick
    How do I map something like domain.com/username? The problem is I think that the MVC routing looks for the controller to determine how it should handle the mapping request. I am pretty new to ASP.NET MVC. However, based on the tutorials so far, the routing mechanism seems rather rigid.

    Read the article

  • Sample MS application for ASP.NET MVC?

    - by DotnetDude
    I am getting started with my first MVC project and want to start off on the right foot. I know the basics of how to create a quick and dirty MVC application. However, I'd like to get my hands on a resource that uses best practices for developing ASP.NET MVC applications (either a document or a sample quickstart app) Any help is appreciated

    Read the article

  • Windows components in .net

    - by JGC
    hi I need a component in .net which able me to partition a year to some part which is making by clicking at the beginning of the part and click again at the end of that. the shape below is a sample of my need but I create it by buttons and back-color of them for showing for you: I don't know the name of this component to search for that. does anyone know this component or something like this? thank you

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >