0
votes
0answers
6 views

SQL Server 2008 Setup configuration checks in C#

Microsoft SQL Server 2008 (or 2012) Setup is not open source in codeplex. It's a pity. Configuration Checker for Sql Server 2008 generates an System Configuration Check Report. I would implement ...
0
votes
1answer
20 views

Manipulating headerless files containing tables

I have files (like plain text) that I should insert into SQL using C#. They are headerless, and even without extension. Only info I have is starting index of every column. Any help how can I do ...
0
votes
1answer
45 views

Violation of PRIMARY KEY constraint with Identity(1,1)

I have been struggling with a non-consistent issue for a while, and am hoping to get this figured out. At random times my system will have a group of 4-5 INSERTS that fail due to: Violation of ...
0
votes
1answer
17 views

Denying Access to specific pages for a set of users in ASP.NET MVC Web API

I have developed a web API in MVC4 and I am working on authentication and authorization. I have different types of users who should have a different look at the API. So, I just created a table with ...
0
votes
2answers
17 views

Passing values from variables in Insert query in C#, ASP.NEt for MSSQL Server Database

I am using Jquery to post back values and its successfully posting back to server I checked with Mozilla FireBug. I am using these values in the insert query in .CS file to insert data in a table. The ...
0
votes
1answer
17 views

How to Save a Hashed Password and Salt to Varbinary Table Column From Code First Seed Method?

I'm working with Entity Framework Code First Migrations and I'd like to have the Seed method in my Configuration.cs file create a default user for me. I'm storing the hashed user passwords in the ...
0
votes
1answer
27 views

BCP entire record to one field in sql server table

I am using bulkcopy to insert (large) text files into SQL server. Until now I always used a table like this create table mijndatabase.dbo.invoer ( veld varchar(max) ) Then I use the following DOS ...
1
vote
2answers
45 views

How to write SQL Server query in ASP.NET? [on hold]

I have Process SQL Server table and some columns and their values. ID Step StateID SenderNo 61cc2608-81b8-48a2-89ce-8887438985bb 9 125 ...
0
votes
0answers
24 views

Retrieve Sql Data Using WebMethod & Jquery

I wants to retrieve data from sql server using webserver/jquery and I read many articles but not getting the require matters except below but I think It's support FrameWork .Net 3.5 not 2.0. And I ...
0
votes
0answers
9 views

Calculate Data Fields in SQL server And update Accordingly related fields based on existing data

I am working on EF5 in VS2012 in C#. I have two tables NIC and Network switch, with 1:M relationship. A Networkswitch can have many NICs and a NIC can be assigned to only one NetworkSwitch. Now i want ...
0
votes
1answer
9 views

MSSQL Connection from IIS7

VS is a pain in the ass. When debugging with IIS Express - without creating SSL certificates or anything - everything works fine: DB connection, AD connection, SQL connection. When sending everything ...
0
votes
1answer
15 views

EF entity with local file reference, transactional integrity

I have EF entity that has a reference to local file. I'd like: file to be created/updated/removed along with entity file changes rollback to take place along with database operation rollback (by ...
-2
votes
1answer
40 views

Get Username when committing to SQL Server database

I've been building an application for almost a year now and ran into an issue when trying to use SQL Server triggers to write the users name to the database. I had the database saved locally this ...
0
votes
3answers
55 views

Use Null as parameter in SQL

I have this column in my table that is nullable, and when I execute a store procedure that does an insert via SQL Server Manager and I have a null value for the parameter for that column it does not ...
0
votes
1answer
30 views

Select all (unknown) columns based on other column

I am trying to find a sql query that will perform the following functionality. I want to be able to do this with sql instead of using c#.net arrays and processing. Here is the table: it contains only ...
0
votes
1answer
38 views

Using “PIVOT” in SQL

I made this question a while back. SQL Server making rows into columns Basically, the person that answered explained very well what I needed to do. However, I encountered a problem aID| status | ...
0
votes
2answers
32 views

Is it possible to get hostnames of computers connected to MS SQL database?

with following code you list all users that are connected to certain DB [System.Reflection.Assembly]::LoadWithPartialName(‘Microsoft.SqlServer.SMO’) | out-null $Sql = New-Object ...
0
votes
1answer
36 views

Entity Framework 5 : Get Auto_Increment value before insert

I currently have a table as defined as follows: CREATE TABLE ( ID int identity(1,1) primary key not null, field_one nvarchar(max) not null ) I am using Entity framework 5 to insert records ...
0
votes
1answer
49 views

Entity framework Dynamic query with OR conditions

I am creating a creating an application that searches the database and allows the user to dynamically add any criteria (around 50 possible), much like the following SO question: Creating dynamic ...
0
votes
2answers
55 views

Get the number of records from a database using sql

I am creating a test that will return the number of records in a table after I insert one record into it. The table in the database is initially empty so the count should return 1. This is the code ...
0
votes
0answers
35 views

How can I get data out of PayPal to use in my database? [on hold]

I am creating a small e-commerce website using ASP.NET and C#, and I would like to use PayPal as my shopping cart (sort of). However I need to get data from a each purchase into my database (SQL Sever ...
1
vote
2answers
35 views

SelectedIndex not inserting correct value

I have a method to insert user information into the SQL Server database. I have my combobox populate on pageload event. The user selects the input they want and hit update if they are updating a old ...
0
votes
1answer
40 views

Using a Variable for DB Name in SQL Script, Running it from C#

I have script that needs to be run from a console application but the Database name will be whatever is in the app.config. I've been researching using variables in scripts and passing them in from C# ...
0
votes
2answers
33 views

SQL error 26 visual studio

Hello I've been getting this error message for some time now. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was ...
0
votes
1answer
47 views

Varying number of records

I am executing a SQL Server stored procedure from my C# code which essentially pulls some data from a database based on the supplied condition. DataSet GetAllxxxxxByDate(string entityValue,string ...
1
vote
3answers
66 views

How to Get Data from Stored Procedure in SQL Server

I read data from my stored procedure. When I insert a breakpoint I get this situation: The stored procedure returns one row with 8 columns. You can see this on a picture. But when I am trying to ...
1
vote
1answer
26 views

Converting strings to buffers and back again

I have a SQL Server UDF calling a CLR DLL (C#.Net) calling an unmanaged C/C++ DLL. As a test I am just trying to XOR a SQL VARCHAR or NVARCHAR and pass it back again. I am trying to do it without any ...
0
votes
1answer
45 views

C# SqlDataReader write mutiple rows

I wonder how I could write out my rows, and not the first one only. Here is my c# string SessionID = Session["ID"].ToString(); using (SqlConnection connection = new SqlConnection(@"Data ...
1
vote
1answer
51 views

How to add seconds and hours in Stored procedure sql

I am using Microsoft SQL Server Managment Studio 2008. I am trying to get information from database. There are the example of linq query var fbPost = db.FacebookStatusUpdates ...
1
vote
3answers
58 views

An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll

I'm a beginner with c#, when I execute the code this error message occurs>> "An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user ...
-3
votes
3answers
80 views

How to get SQL Server datetime value as it is in 24 hours in C#

I am developing an app in VS2010 c# to fetch a single row data from SQLServer and insert it to MySQL. I have a table with column name Date_Time containing date and time in 24 hrs. format as shown in ...
0
votes
0answers
18 views

Pass hard-coded Ids of lookup rows to a stored procedure vs. descriptions

Recently, I have encountered some fairly strong opinions about how to answer the following question: When it comes to passing "lookup data" to a stored procedure (like PhoneType), is it better ...
0
votes
0answers
41 views

SQL Compare table with .txt file

I have a table in SQL table name- Master which have Million of records and have Child1.txt file which have data. I have to remove the data from Master table which are not present in Child1.txt file. ...
-3
votes
2answers
40 views

SQL Databases on more than one computer

I'm writing a desktop program that allows you to view customer information, as well as adding, removing, editing etc. It's to be installed onto a friends computer. The database will be stored locally ...
0
votes
1answer
61 views

Get double value from query result

I call a store procedure in C# the results are: 0.033333 0.550000 0.133333 24.133333 In my c# code I need to check which one is high than 24. How can I get double convert the query result to do ...
0
votes
1answer
67 views

How can I insert a null value into Sql Server date column using asp.net and command parameters

I have the following code: SqlDateTime sqldatenull = SqlDateTime.Null; sSql = "INSERT INTO mydb.dbo.myTable(FromPeriod) Values (@FromPeriod)"; if (sFromPeriod.Length == 0) { ...
0
votes
1answer
30 views

Nhibernate large transactions, flushes vs locks

I am having a challenge of maintaining an incredibly large transaction using Nhibernate. So, let us say, I am saving large number of entities. If I do not flush on a transaction N, let us say 10000, ...
1
vote
1answer
25 views

Multiplicity constraint violated Entity framework 5

Hello i have 3 classes Person, UserProfile(it inherits Person) and Results, a Person can have one or more results, when i try to add i a result to a person a i get the error mentioned in the title, my ...
0
votes
2answers
46 views

Grab image from web, save it in sql database

I'm trying to grab an image from the web, and add it to my database. String lsResponse = string.Empty; using (HttpWebResponse lxResponse = (HttpWebResponse)req1.GetResponse()) { using ...
1
vote
1answer
33 views

How do I insert rows if their values appear in a list but are not in the table and delete them if they do not appear in the list but are in the table?

Recently, I was put in charge of cleaning up a SQL Server 2008 database and code for website, and am having trouble coming up with an elegant solution to the following problem. On the website, there ...
0
votes
2answers
41 views

Select with list among the variables

I want to query my DB to find a specific Group and all comments regarding that Group. I can do this easily with direct SQL (SqlCommand) but with linq to sql I run into problems regarding the select ...
0
votes
3answers
38 views

OR LIKE sql query boolean error

I'm trying to search an employee record but i'm getting this error message: An expression of non-boolean type specified in a context where a condition is expected, near 'OR'. This is the code I'm ...
2
votes
1answer
42 views

Dropdownlist with sqldatareader

my dropdownlist HTML5 <select runat="server" id="ddlStateLegalRes" name="ddlStateLegalRes"></select> On my page load I am binding my dropdownlist to a list collection with a list of ...
0
votes
2answers
45 views

How To Deploy A Windows Application That Uses SQL Server (Standalone EXE)

I currently access & write data to/from text files but want to make a move over to SQL Server (Also not yet sure which version). Note: This is a Windows Desktop, Windows Forms Application. My ...
1
vote
1answer
51 views

Need to convert SQL to Linq-To-SQL

select cast(' ' as varchar(1000)) as myfield, otherfield from tab1; I need to convert above SQL to Linq-To-Sql.
0
votes
1answer
28 views

Get list of referencing tables in SQL Server using C#, SMO

Consider there are three tables in database, say person, student, teacher. person (person_id, name, person specific columns...), student(student_id, foreignKey(person_id), student specific columns... ...
0
votes
2answers
44 views

Open connection trouble when trying to insert data into SQL Server database

I have created a Main form with password request to login to next form depend on a username. Now here I have made another form with tabs. One tab for inserting data, other one for checking data. I ...
-1
votes
2answers
46 views

How to get updated table names in sql server?

Currently I'm getting all table names in the db and adding to "List saka" and "listbox1 " with listBox1.Items.Clear(); fare = bag.GetSchema("Tables"); foreach ...
0
votes
1answer
26 views

Large dataSet to virtual memory?

Over View I Have a service that Picks Data from SQL Server Tables into a dataset, and this dataset is then used to upload the data to a Central server over the internet. I can not remove the ...
0
votes
3answers
36 views

Converting DateTime of SQLServer to MySQL

I am developing an app in VS2010 c# to fetch a single row data from SQLServer and insert it to MySQL. I have fetched data and stored in particular string variable. Fetching code is as below. ...

15 30 50 per page