Tagged Questions
2
votes
2answers
69 views
Building Session-Variables from a sql stored procedure
I have been advised to submit my code here by a fellow Stack contributer as it was suggested the code could be further improved;
Calling Code and attempt at building session variables:
DataTable ...
-1
votes
2answers
154 views
Insert to datagridview when SELECT query has WHERE condition [closed]
I use this code to Load and Insert data to a table using a DataGridView in a C# windows application.
SqlCommand sCommand;
SqlDataAdapter sAdapter;
SqlCommandBuilder sBuilder;
...
1
vote
2answers
70 views
Is there a simpler way to write a row from one table to another?
I have the following code:
const String sqlSelect = "SELECT * FROM UserPasswords WHERE username='System Administrator';";
const String sqlInsert = "INSERT INTO UserPasswords VALUES ...
4
votes
3answers
163 views
Handling optimistic concurrency violations
I'm trying to establish a concurrency violation verification in my SQL updates using C# and raw SQL.
What I'm doing now is storing the TimeStamp value in a byte[] upon selection and before updating ...
2
votes
2answers
228 views
Improving the way a C# application communicates with a SQL database (Via SqlConnection)
*Originally posted this on stackoverflow but was told that it would be better suited here.
So I'm looking for a better way to setup how an application talks with a database. I'm sure this question ...
0
votes
1answer
196 views
Hot Observable of Change Tracking Events from SQL Server 2008 R2
After I found the Change Tracking feature in SQL Server, I thought that I would love to have this information in a stream. That lead me to RX, and Hot Observables. Did some reading, and came up with ...
1
vote
1answer
54 views
(More) efficient and elegant way to retrieve data from a dataset?
I have a DataSet with only two tables in it. The first table is a list of models (of products) with default parameters (settings), and the second table is a list of modules. A module is a product ...
0
votes
1answer
108 views
Is this a good way to limit the occurrence of OutOfMemoryException?
I have a class that uses the SqlBulkCopy to bulk insert data into a SQL Server database. My original implementation just passed the m_buffer (which is a reference to a class that implements ...
0
votes
1answer
90 views
Products table or Products + attributes when using EF + MVC 4 [closed]
What I need to build is a web application that maintains and shows products. A product has a lot of attributes, some that will be changed or added during the next year. I have 2 options for designing ...
0
votes
0answers
66 views
Building database from file C# Mysql
well as the question reads I am building a database with 3 tables. Now these tables are going to be used to store names in.
Table 1 will store First Names Table 2 will store Last Names Table 3 will ...
1
vote
1answer
174 views
How to dump UCCX stored procedure results via c# to SQL Server
I am writing a simple-ish c# CLI app to improve our telephony reporting system.
At present, I have a nightly DTS package which dumps a couple of tables from the Cisco telephony box into a database ...
7
votes
3answers
331 views
How to optimize this code to get a instant/better result instead of waiting at least 10 seconds every time?
I have the following code that unfortunately is really slow:
private void FilterSessionByDate()
{
SessionsFilteredByDate =
...
3
votes
2answers
114 views
Any way to speed up this UPDATE?
SQL:
CREATE FUNCTION dbo.fnRandomForeNames ()
RETURNS VARCHAR(50)
AS
BEGIN
RETURN (
SELECT TOP 1 [FirstName]
FROM [tmp_ForeNames]
ORDER BY (SELECT new_id from ...
1
vote
2answers
1k views
Need help in MVC Winform example project to add a record into the DB [closed]
I want to learn MVC pattern using winforms and I have read some tutorial to understand.
Now, i'm working on my own example to just add a customer records in a database using MVC pattern.
The ...
0
votes
2answers
4k views
Getting data from database and then outputing it to the DataGridView
I am at the point where I feel that I am not doing it right. It works and does the job, but I am sure that there are more efficient and smarter ways of doing it.
I would like to see if there is a way ...