0
votes
0answers
26 views
Comparing against database value
What I am trying to do is grab the current logged in users username and compare that against a database which contains users, and also includes an Active flag and an Admin flag. I want to compare the ...
1
vote
2answers
55 views
How to execute a TSQL input command in C# which includes a string with “-”, “\” or “;”
I have a SqlCommand that attempts to insert a row in a SQL Server database table. The column of interest is a nvarchar(100) and the data that needs to be input will include characters such as "-", ";" ...
0
votes
2answers
14 views
Entity Framework 4 - Query parent table and eager load 1 (single) child record
Can't seem to find a good way to search for this online. I'm trying to get all parent records (cars) from a database and I want to include only 1 single child item (image) either in the original ...
2
votes
3answers
65 views
High performance data insert into SQL Server
I'm inserting about 7 million rows into a table in SQL Server. The table has about 9-10 columns and it has a clustered index on 2 keys (columns) and 3 more unclustered indexes. I'm trying to do ...
1
vote
1answer
61 views
Fastest way to insert 30 thousand rows in a temp table on SQL Server with C#
I am trying to find out how I can improve my insert performance in a temporary table in SQL Server using c#. Some people are saying that I should use SQLBulkCopy however I must be doing something ...
-4
votes
1answer
39 views
C# webform data insert into database [closed]
I use visual studio express and have a online mssql database, i have a webform and must this data into mssql, how is this possible, i can't found any solution, is this to do in default.aspx.cs? I Know ...
0
votes
1answer
37 views
Combine 2 SQL Server Tables in one table
I have 2 SQL Server Tables Invoice and Production. Invoice contains these columns (ID, ItemID, Date, AccountNo, Quantity, Type, Price, Total) and the Production Table contains these columns (ItemID, ...
0
votes
2answers
69 views
How to commit all tranasactions in sql server?
i need to commit all transactions at a time to DB.what is procedure for that?
Store the requests from each user in a queue after commit all tranasactions on to the backend DB.
Can anyone please tell ...
0
votes
4answers
78 views
My login function not working
I am developing a C# application which need a login form , user and password are saved in a SQL Server database .
I use my CodePass Function to code password , I have added a user and it's coded ...
-3
votes
1answer
30 views
SHA2_256 not same in C# and SQL Server [closed]
static string sha256(string password) {
SHA256Managed crypt = new SHA256Managed();
string hash = String.Empty;
byte[] crypto = crypt.ComputeHash(Encoding.UTF8.GetBytes(password), 0, ...
6
votes
1answer
53 views
Is Data Reader better or Data Set for application where we may have Concurrency issue
I know the difference between Data Reader and Data Set.
The DataReader is a better choice for applications that require optimized read-only, fast and forward-only data access.
The Data set is better ...
0
votes
2answers
49 views
Sending several sql commands in a single transaction
I have a huge list of "insert into..." string.
Currently run it with:
using (SqlConnection connection = new SqlConnection(connectionString))
{
connection.Open();
foreach (var commandString ...
1
vote
1answer
68 views
SQL Parameters in C# aren't working as expected
I think I'm making a fairly amateur mistake somewhere here, but I can't get SQL Parameters to reliably work in C#. Consider the following code:
protected string[] Query(string dataToFind, ...
0
votes
2answers
37 views
SQL server - inserting a string with a single quotation mark
I iterate over an external source and get a list of strings. I then insert them into the DB using:
SqlCommand command = new SqlCommand(commandString, connection);
command.ExecuteNonQuery();
Where ...
0
votes
1answer
25 views
How to crawl a website/extract data into database C# and SQLSERVER
I want to build an single cumulative webapp where users of my organization can use only one site instead of more than ten sites for different purposes.My organization have different sites for ...