.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

LINQ with pervasive v9 database

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :ASP.Net

How can i connect pervasive database with LINQ in asp.net

Please help...

View Complete Post

More Related Resource Links

Linq - add data to database then email user the details


Hi all

I'm not sure how to structure the code for this but what I want to do is be able to add data to a database, and once this has completed successfully, then email the user to say the details have been added successfully to the database.

I need to:

1. Check that the relevant data has been added into the database then

2. Email the details of the relevant data when completed. 


Thanks in advance for your help,




How to stored datatime into database - linq


Hi, DateTime dt = DateTime.Now; tbl_Payment tbl_Payments = new tbl_Payment() { UserId = UserID, PaymentType = DropDownList4.Text, AmountDeposit =10, Date = String.Format("{0:d/M/yyyy HH:mm}", dt); Compilation Error Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0029: Cannot implicitly convert type 'string' to 'System.DateTime?' Source Error: Line 683: PaymentType = DropDownList4.Text, Line 684: AmountDeposit =10, Line 685: Date = String.Format("{0:d/M/yyyy HH:mm}", dt), Line 686: Line 687: }; Using LINQ for data storage. In Table I column "Date" datetime. How to save a date in the table?


LINQ to SQL - Validating if item is in Database, but if item is not items not inserting into databas



I am new to this, so bear with me.  I am writing an application in C# that uses LINQ to validate a datacontext off a textbox to see if the record exists already.  If the record does exist I inserted an if statement to advise the user that the record exists, if the record does not exist I would like to allow the record to be added to the database.  If I take out my else statement everything works fine as far as inserting goes, but I do not want to allow inserts in this scenario.  I have tried moving the if and else statement to different parts of the code but can't quite figure this one out.  Any help would be apprecaited, attached is the code.  This code is set to a button press.  As a matter of fact, if you see any other errors along the way please feel free to point them out. 



    protected void enterBTN_Click(object sender, EventArgs e)
        //make new data context

        SHCDataContext insNewAll = new SHCDataContext();
        //LINQ to check if customer exists in database
        var checkExisting = from c in insNewAll.Customers
                            where c.custLastName.Contains(custLastNameTB.Text.ToString())
                            select c.custLastName;
        //make list to store values

Dynamically Create a Database (LINQ to SQL)

 Hello... I want to create an install script for a simple little CMS I have created for myself... I want to pass the connection string and then create my tables. I found the following example on MSDN: http://msdn.microsoft.com/en-us/library/bb399420.aspx My question is how do I pass the username and password to the DB... or even better if there is an example of this somewhere that would be great.   Thanks!

Retrive about 90,000 recored from Database in LINQ


I want to get the customers info and companies of this companies of products they  deal with
here is my query in linq

 var query = from sd in db.Survey_Details
                    select new
                        id = sd.Surveyy.Customer != null ? sd.Surveyy.Customer.ID : 0,
                        name = sd.Surveyy.Customer.Name,
                        Address = sd.Surveyy.Customer.Address,
                        tel = sd.Surveyy.Customer.Tel,
                        mob = sd.Surveyy.Customer.Mobile,

Download a File from a Database Using LINQ to SQL


I have used AsyncFileUpload AJAX control to upload a file to a column in a SQL Server database using LINQ to SQL.  Below is the code.  How do I retrieve the document and allow the user to save to local drive using a Save As Dialog box using LINQ to SQL?  This is ASP.NET web application.  The DocumentFileContent database column is a Image SQL Server data type.  Thanks

var VRRRMDataDataContext = new VRRRMDataDataContext();

VRRRMWeb.AllUsers.Document custDocument = new VRRRMWeb.AllUsers.Document
   DocumentFileName = AsyncFileUpload1.FileName,
                        DocumentDescription = txtDocmentDescription.Text,
                        DocumentFileContent = AsyncFileUpload1.FileBytes,

Linq to save file on database


I need to show an AsyncFileUpload in insert template for the listview and bind its FileContent property to the Content property in my AttachedFile Object (that linq created when it mapped my AttachedFile Table in the database)

I've no idea how to go about wiring all this up. Plz Help!

Custom database function cannot be translated into a LINQ to Entities store expression



I'm trying to get a UDF from my SQL Server database to map to Linq to Entities. I've found an example for the CourseManager sample in the MSDN :




Sub Button1_Click(

Simple Database connection check to seee if the database server is up and running using linq


I am using Linq

Before i start executing my query, want to check if the database connection is being established, i.e if the database server is up and running.

Incase database is down, display appropriate error message?

How can i do that?


create LINQ to database in the .NET Compact Framework 3.5

The article create LINQ to database in the .NET Compact Framework 3.5 was added by suhasharidas on Monday, March 21, 2011.

Let see an example of using the database in LINQ and C#.netcf We will using classCustomer Here's some sample data: using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System

Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Playing with Linq grouping: GroupByMany?

One of its features is grouping. Many people understand grouping like it is defined in Sql. Linq is implementing grouping quite the same way. Let's discover this syntax and how to make consecutive groups easier.

LINQ : Implementing IN and NOT IN

I got tried of typing

var result = from s in source
where items.Contains(s)
select s;and so I implemented the IN and NOT IN methods as extension methods:

101 LINQ Samples Tutorials

101 LINQ Example with sample code snippets....This sample prints each element of an input integer array whose value is less than 5. The sample uses a query expression to create a new sequence of integers and then iterates over each element in the sequence, printing its value

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

Linq: how to share parameters between lambda expressions ?

When using Linq to objects, you will quickly feel the need to pass some parameters from a method to another but it's not so easy because each Linq method is not calling the following one. In a Linq sequence, each method is using the result computed by the previous one. So, local contexts are not visible from one method to another.
The compiler is using two technical different ways to let parameters go out of a method.

Linq to Sql CompiledQuery container

Ok now let's go. Here is just a little trick but with some interesting patterns that could be useful in some other contexts not connected to Linq to Sql.

When using Linq expressions, like with Linq to Sql, translating the expression into something else (sql for example) is taking time and resources. Sometimes it's negligible, sometimes not...
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend