SQL Server is a relational database management system from Microsoft. Use this tag for all SQL Server editions including Compact, Express, Azure, FastTrack and PDW.
0
votes
0answers
3 views
SQL Server Compact Edition 2005 open fails with E_FAIL Unspecified error with VS 2005 C++ and ADO
When trying to use SQL Server Compact Edition to replace SQL Server modifying just the connect string my application is unable to access the .sdf database file successfully.
I would like to have ...
1
vote
1answer
29 views
Merge Statement with two inserts?
Given is a simple MERGE statement. Where I Insert/Update records into traget table. Question: is it possible to also Insert those values in another table with a flag beeing 0 for insert and 1 for ...
0
votes
1answer
19 views
Insert into database after creating user
I am using Altairis security providers for a memebership and roles in my asp.net web application. For registration I use CreateUserWizard. And after the user is created I want to insert his username ...
1
vote
2answers
34 views
How can i run once on time procedure?
I wrote multi-threads application that every single thread call a sql server procedure.. i need to protect a row from getting by more than one thread i want every row take it only with by one thread i ...
0
votes
2answers
33 views
Join Subquery in FROM clause aliased in WHERE clause
How can I move the join that is currently in the WHERE clause AND subMainTable.ID = MainTable.ID into the the FROM clause.
I cannot seem to move it there due to the way it is aliased.
This is a ...
0
votes
0answers
17 views
Adding Advanced Services to SQL Server 2008 Express
I am using SQL Server 2008 R2 Express (x86, Version 10.0.2531). Today, I needed to use full-text index option. This option can be seen by right clicking a table name in object explorer. My mentioned ...
2
votes
1answer
14 views
Update, find/replace for xml field
I have a Page table in my database.
Lets say for simplicity it has two columns; title and xmlData
It has Title something like "my example "
and I have a xml field that looks like:
<MA>
...
3
votes
1answer
30 views
how to run a Stored proceure which returns a dataset
I have a simple stored procedure(Select Name,ID from MyTable) and I want to call it from C#(or VB.NET) to populate a dataset.
Here is my code:
Public Class PaymentDataAccess
Public Function ...
0
votes
0answers
25 views
BULK insert error
I am trying to BULK insert from .csv file and i get the following error:
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 2, column 23 ...
0
votes
0answers
8 views
Is full text search suitable for me?
I want to search in a table. All I need is:
1- to have different weight for columns. For example suppose I have a table that have id, title and description fields. Then if a keyword exists in title, ...
2
votes
4answers
32 views
ExecuteScalar returns false for SQL count(*)
I have the following function to check if a user exists in my SQL table
private static bool userexists(string user)
{
bool userexists = false;
SqlCommand c = new SqlCommand("SELECT COUNT(*) ...
2
votes
1answer
33 views
easy way to corporate between c# date and sql datetime
I keep having the same problem in my c# projects. I try to insert datetime to sql table, but in Turkey. the date is always DD.MM.YYYY, C# or SQL sometimes try to insert MM.DD.YYYY like American way.
...
1
vote
2answers
26 views
Display value from Database to TextBox
I have a listview that display all EmpID and EmpName from database. How I will view the value from database to textbox when I click on a row? This is how I display the selected row from listview to ...
1
vote
3answers
22 views
how to show the line breaks of a nvarchar string from the database in an html page using repeater
Here's the deal.There's some nvarchar text in my database that have CHAR(10) + CHAR(13) for line breaks.I am using an <asp:repeater> to show and style the database's content.Here is how my aspx ...
0
votes
1answer
23 views
how to pass model with jquery ajax post with datetime
On my button click i am passing model to the controller with datetime objects in that in my local database it is working fine but when i upload to server the datetime value is taking null.how to ...