Hi Dear,
I am dealing with SQLite with .net environment.
When I use a TableAdapterManager to update a dataset, which is designed in the visual studio and contain "RowState is Deleted" rows, the ConcurrencyDBException occurr.
If I go to the dataset designer and disable the optimistic concurrency option, it will works.
But I don't want...
Hello, I'm using Entity Framework in my project. The Framework has created its own connection string, so my web.config connectionStrings section file looks following:
<connectionStrings>
<add name="ApplicationServices" connectionString="data source=TEST186;user id=vnkuser;pwd=vnkuser;initial catalog=VNK" providerName="System.Data....
I have a string[] of the list of tags to use with my SQL statement.
The code is pretty obnoxious to write. Maybe i'll paste when i have it finished and working but essentially i need to show all items with a list of tags applied. All of the tags must exist. So i have code like tN.name = a[n] AND tN2.name = a[n+1] ...
Is there a way i c...
Can anyone point me towards a current library that provides basic wrapping of ADO.NET functionality? I'm looking for something along the lines of the old SqlHelper class and am not really interested in using the Data Access Application Block (as it's a bit of overkill for my simple needs). What is everyone using for working with ADO.NET ...
Background: I am using Nhibernate in an ASP.NET MVC application with an open-session-in-view pattern and I need to use raw ADO.NET to execute some performance-critical database operations.
I'm somewhat confused about how I should be getting my connection instance as I've seen two different methods in numerous blog posts.
Do I want to u...
Background: I have an ASP.NET MVC application that wraps controller actions in a TransactionScope using an Action Filter.
Further downstream (in my infrastructure layer); I'd like to open up a new ADO.NET connection (to the same db as my outer TransactionScope, if that is relevent) and have it participate in its own transaction - withou...
Hi all!
Enviroment: asp.net framework 2.0
I'm having problems with the Delete method of and ObjectDataSource on a custom object. The Select, Insert and Update methods works fine.
Here is the code of the classes:
public class Car
{
public string ID {get; set;}//I know this is 3.0+ syntax.
public string Description {get; set;}/...
I have a DataGridView that displays data from a MS Access database. I'm using a DataSet with a TableAdapter and a BindingSource to link the data to the DataGridView:
tableAdapter = new AccountsTableAdapter();
dataTable = new Accounts.AccountsDataTable();
tableAdapter.Fill(dataTable);
tableBindingSource ...
The destination and source tables both are within the same sql server database!
...
Hi all,
I am starting on a new large project and I'd like to use EF4 for the data layer stuff, mainly for the POCO mappings feature.
Am I a fool for stating work against a CTP release? Should I wait for the RTM? Given my project will likley take 12 months, could the RTM be out by the end of my project?
I'm sure others have been in the...
Hi,
I just come across a strange problem where i cannot retrieve the sql stored procedure out parameter value. I struck with this problem for nearly 2 hours.
Code is very simple
using (var con = new SqlConnection(connectionString))
{
con.Open();
SqlCommand cmd = new SqlCommand("sp_mgsearach", con);
...
I'm creating a .exe in C# to import data from Excel and insert into my DataBase.
This Excel file has in each column the name and the values below and for each Table in DB it has a sub table(those that are changed on the bottom of the page in Excel) with the table name.
It's working fine, but one of the tables in my DataBase has a forei...
I have an application which uses SqlConnection.ClearAllPools to close all connections before dropping a database.
There is a case where a connection is still there. This connection had been created in another application domain.
So I wonder which connections are closed by SqlConnection.ClearAllPools?
Only the connections opened by t...
I'm experimenting with postgres and sql server
the same query in sql server gives me:
CPU time = 31 ms, elapsed time = 800 ms.
and in postgres:
38 ms
but when I do the same query via .net using SqlConnection,SqlCommand and NpgsqlConnection,NpgsqlCommand
the sqlserver is 30% faster
can anyone explain this ?
...
Hi,
I've created my entity using ado.net.
So far i have the following Fields for the entity person:
PersonId - Primary
ExternalId <- should be unqiue
FirstName
LastName
[...]
In model.edmx entity view i don't know where to click, so that i can mark the propery "ExternalId" as an unique property.
Thanks in advance for any reply.
...
Consider the following code:
Dim sql = "SELECT * FROM MyTable WHERE value1 = @Param1"
If someCondition Then
sql = sql + " AND value2 = @Param2"
End If
Dim cmd As New SqlCommand(sql, conn)
cmd.Parameters.AddWithValue("@Param1", param1Value)
cmd.Parameters.AddWithValue("@Param2", param2Value)
Assuming that I built a complex sql sta...
hi,
there are two tables in database.
one is 'books' with 4 columns
pkid,title,price,writer(int)
and other is 'persons' with columns
pkid, name,value(int).
one asp.net page is there with text boxes named
title,price,writer and a submit button.
i want that on filling that writer txtbox with some name which is available in 'pe...
is there some library for connecting to postgresql database and to have support for TransactionScope
I tried Npgsql but it doesn't yet support transactionscope
...
When one has a Gridview and two datatables and one wishes to get the parent row and bind it to a gridview, how would this be done?
...
I'm using Quartz.NET with a database, i.e. ADO.NET. Problem is, when my jobs are created, they are not being saved to the database at all. Have I configured everything right? I am using SQL Server Express, and the path to my database is 'chris\sqlexpress.Quartz.dbo'.
Relevant parts of config file:
quartz.jobStore.type = Quartz.Impl.Ado...