Hi
I have a webform which has a gridview. the gridview (gridView1) has been bound to a datatable (dataTable1).
when user creates a new row, I add that new row to the dataTable1. Also, when he updates a specific row within gridView1, I update dataTable1.
Now, I want to save all rows within dataTable1 in DB. How?
...
Hello ,
in the past hour i have been trying different variants of this query but i get error at the username , and the username is just a normal string with username that i get from xml file containing no special characters or whatsoever
I'm using SLQ compact 3.5
P.S i tried to use ? instead of @username also not working
all feild...
I am trying out Ado.Net Data Services with this code and I get the following error when trying to access the service :
The server encountered an error processing the request. See server logs for more details.
Any ideea why?
public class WebDataService : DataService<DemoData>
{
public static void InitializeService(IDataServiceConfi...
I have an Entity Data Model being read by an ADO .NET Data Service.
The entity in question looks like this:
**PaidAmount**
Id
FY_1993
FY_1994
...
FY_2030
Is it possible to set a default value so that values of 0 aren't serialized?
I have tried setting FY_1993's Default Value to both 0.00 and 0 but when I view the Entity in the .svc t...
If you have a DataGridView that is bound to a DataView (someDataTable.DefaultView).
..and a number of edits are performed on rows in the underlying DataTable from code.
Is it possible to defer the updating of the DataGridView until you decide that you are finished editing rows?
As it is, the DataGridView is updated after every edit, w...
Is there any way to bind a DataTable object to an actual table in my database? Right now I perform a query and fill the DataTable with the result. It would be really cool if I could just DataTable.(Save/Update) with out having to write additional code!
Is such a thing or a similar solution possible?
...
Hi friends I would like to know the difference between "sqlhelper class and data acsess application block". When I googled for sqlhelper calss some links are directing me to "access application block" like http://msdn.microsoft.com/en-us/library/ms954827.aspx. which is best to use. Thanks.
...
I get the following error:
The 'Miccrosoft.Jet.OLEDB.4.0' provider is not registered on the local machine
When I run this code:
string dbConn = @"Provider=Miccrosoft.Jet.OLEDB.4.0;Data Source=C:\structuredfunds.mdb";
string cmdText = "select * from StructuredFundPosition";
DataTable dt = new DataTable();
using (OleDbDataAdapter da = n...
Hi,
In my application I am using a dataview for having the filters to be applied where the filter options are passed dynamically.if there are 2 filter parameters then the dataview should be filtered for parameter1 and then by parameter two. I am using a method which is called in a for loop where I am setting the count to the total no.of...
Hi All
I have this situation and I'm trying to think of the best way to solve it. I have a database, say DB-A, with a table T-A that has 2 fields - OID and PID. This table has close to 1million rows. Now due to some other issue, the PIDs of most of the rows were incorrectly set to 0 and this was found only after a couple of days.
I hav...
I am trying to create a method that can be exposed through an ADO.NET data service. No matter what I do, the client cannot see the method that I am exposing. I am out of ideas. Please help:
[WebGet]
public ObjectResult<Product> GetAllProducts()
{
ProductOrdersEntities entities = new ProductOrdersEntities();
r...
What is the difference between data adapter and data reader?
...
We wrote a MS Word Add-In using VSTO 2.0. In this Add-in we've connected to a sql server database. Anything went fine. Now, our client wants to switch to an Oracle DB. When we try to connect now via the Sytem.Data.OracleClient Provider, we get a SecurityException saying:
"Request for the permission of type 'System.Data.OracleClient.Orac...
I have a IDbConnection for both Sql or Oracle connections. I have no problem to open it and then read data or save data through the connection. However, when the job is done, I tried to close the connection. Then I got a exception: "Internal .Net Framework Data Provider error 1".
Here are some codes to close the connection:
if (conn !=...
I understand that if I instantiate a SqlConnection object, I am really grabbing a connection from a connection pool. When I call Open(), it will open the connection. If I call the Close() or Dispose() method on that SqlConnection object, it is returned to the connection pool.
However, that doesn't really tell me if it's really closed,...
I'm using a database as a kind of cache - the purpose is to store currently known "facts" (the details aren't that interesting). Crucially, however, I'd like to avoid inserting duplicate facts. To do so, the current data access code uses insert or ignore in many places.
I'd like to use the entity framework to benefit from it's managea...
private void button1_Click(object sender, EventArgs e)
{
string name;
name = textBox5.Text;
SqlConnection con10 = new SqlConnection("con strn");
SqlCommand cmd10 = new SqlCommand("select * from sumant where username=@name");
cmd10.Parameters.AddWithValue("@name",name);
cmd10.Con...
Hello,
1)
A) DataSets can be 10+ times slower than DataReader at retrieving data from DB. I assume this is due to overhead of DataSets having to deal with relations etc.
B) But is the speed difference between DataSets and DataReader due to DataSets having to retrieve more data ( information about relations ... ) from DB, or due ...
We are using ADO.NET Entity for our ASP.NET application.
I have read that the pre-generated views improves the performance. Referred to the blog post,
http://blogs.msdn.com/adonet/archive/2008/06/20/how-to-use-a-t4-template-for-view-generation.aspx, I generated the views. The namespace & classes generated as
namespace Edm_EntityMappi...
Hello everyone,
I am using VSTS 2008 + C# + .Net 3.0 + ADO.Net + SQL Server 2008. And from ADO.Net I am invoking a store procedure from SQL Server side. The store procedure is like this,
SELECT Table1.col2
FROM Table1
LEFT JOIN Table2 USING (col1)
WHERE Table2.col1 IS NULL
My question is, how to retrieve the returned rows (Table1.col...