How to know that DataTable is already subscribed to OnRowChanged or OnColumnChanged events ?
I am facing a issue with many notifications in my app ? so I wanted to put a check and want to subscribe table only once ??
...
Hi,
I execute a query that calls a SP, that SP returns data... but when I call it with a DataAdapter I get no result data, if use a DataReader instead... then I get data. The database is SQL Server and the code is using OleDb for reasons I cannot change.
These two calls returns diferent things:
String commandText = "Declare @retur...
I am trying to write a Powershell script to run a general SQL command against a database. The idea is that Run-SQL "select ..." will run the SQL text against the currently open database. If the SQL statement is a query, it should return a DataTable. If it is a non-query (DDL or DML) it should return nothing ($null).
In order to do this,...
Hallo all.
I need to run the 'replace([column], [new], [old])' in a query executing on n Access 2003 DB. I know of all the equivalent stuff i could use in SQL, and believe me I would love to, but i don't have this option now. I'm trying to do a query where all the alpha chars are stripped out of a column ie. '(111) 111-1111' simply bec...
We're using ADO.NET with parameterized queries with SQL Server using the DBCommand object, so the parameter symbol is @, and things have been working fine. However we now have a query where @ is part of the hard coded data. By default ADO.NET thinks it IS a parameter and the whole thing goes pear shaped.
Is there a way to escape the @...
Hi all,
I want to select certain amount of data from one table. Based on those data, I want to check another two tables and insert into 2 tables.
So I want to iterate the resulted data. Which way is better(faster) and reasonable using DataReader or DataTable?
Thanks in advance
RedsDevils
...
Hi,
In my application i have datagrid with simple type of cells - string, integer.
I want to change one of the cell from string to be combobox.
i try to populate the in each line different inomration, but did not see anything.
It means that i see comboBox in each cell of the column but the comboBox is empty.
enter code here
DataGri...
When I'm trying to execute the following sql block, I got the following Exception
ORA-06550: line 1, column 6:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-ident...
I'm writing an app which should take a sql file generated from mysqldump and import it into a mysql database. Is there a way to do this from ADO.NET or do I need to use the mysql cli?
...
I started out at a medium sized financial firm, and everything was done using a home brewed ORM. I've recently moved to a web shop and it's a mix of ADO.NET and linq to sql. I'm wondering what other people are using at their shops, and why? Are you happy about this, or do you wish you were using another approach?
Do-it yourself usin...
I just started reading about stored procedures. Can anyone please help me call a stored procedure in oracle from C#
Thanks in advance
...
We have to implement a two tier architecture to distribute a cache from a central Oracle DB to a lot of clients (circa 200) into an Intranet. After some experimentations we have opted to use a direct connection from the client to the DB server. This decision has been taken to simplify the architecture and to reduce the overheads.
Client...
Hi,
I am using Custom data service provider for an application.
I need to add following class as entity
public class PhysicalAddress
{
public PhysicalAddress();
public string City { get; set; }
public string Country { get; set; }
public string CountryCode { get; set; }
}
class Parent
{
public PhysicalAddress[] Address { ge...
The situation is:
I want to create two stored procedures:
query1 = CREATE PROCEDURE MyProc1 AS SELECT * FROM TEST1;
and
query2 = CREATE PROCEDURE MyProc2 AS SELECT * FROM TEST2;
I can do it using
command.CommandText = query1;
command.ExecuteNonQuery();
command.CommandTest = query2;
command.ExecuteNonQuery();
Is it possible t...
I have an SqlCommand with parameters. Due to some external requirement (see PS), I need one T-SQL string instead, i.e., I need ... @parameter ... replaced by ... the-value-of-@parameter-encoded-correctly ... (e.g. O'Brien --> 'O''Brien', 02 Mar 2010 --> '20100302', 3.5 --> 3.5).
I know that I could home-brew such a solution quite easil...
In the past, I have populated GridView's with 'manually created' data sources in the code behind, by doing this in the Page Load:
DataTable myData = SomeMethod(); //Returns a DataTable
myGrid.DataSource = myData;
myGrid.DataBind();
and whenever I wanted to download the data to a CSV file, I'd just add the following to the button's Cli...
Consider this code (Yes its ugly but it should also work):
try
{
// Test the connection to a database that does not exist yet...
using (SqlConnection c = new SqlConnection("Data Source=localhost;Initial Catalog=test;Integrated Security=True"))
{
c.Open();
} // Dispose calls Close()
}
catch
{
//... will fail w...
hi all
write one project and encountered with one problem
code:
private SqlConnection scon;
private SqlCommand scom;
string defConnection =
"Data Source=" + Environment.MachineName + @"\SQLEXPRESS;" +
"Integrated security=true;" +
"database=dbTrash";
string altConnection =
"Data Source=" + E...
Hi folkds,
I've got a source database (Sybase), which is read-only and you can write to the database with a import file. The other side is my own database (MSSQL) which has no limitations.
The main problem is that there are no timestamps on the first database and I don't have any access to change the source database. So is there a engi...
Hi,
I wanted to know if we can timeout a sql query.
In the sense, that suppose I have a sql query whose output is useful only if gives the output in 10 minutes ,after which even if it outputs the results its of no use to me.
What I want to do is that if the query takes more than 10 minutes to do the processing then it should just kind...