Hello all ,
I am using this function SQLRTTESTCONNECTION2() to connect to SQL server.
Its returning me as value 1 ,which means failure to establish a connection.
What could be possible cause for this?Any ideas please?
...
Hi,
The question is about Armenian. I'm using sql server 2005, collation
SQL_Latin1_General_CP1_CI_AS, data mostly is in Armenian and we can't use unicode.
I tested on ms sql 2008 with a windows collation for armenian language ( Cyrillic_General_100_ ), I have found here, ( http://msdn.microsoft.com/en-us/library/ms188046.aspx ) but ...
When using SqlCommand to call a stored proc via RPC, it looks like it is possible to call a stored proc in a database other than the current database.
e.g. :
string storedProcName = "SomeOtherDatabase.dbo.SomeStoredProc";
SqlCommand cmd = new SqlCommand(storedProcName);
cmd.CommandType = CommandType.StoredProcedure;
I'd like to m...
hi,
DECLARE @sqlCommand varchar(1000)
DECLARE @columnList varchar(75)
DECLARE @city varchar(75)
DECLARE @region varchar(75)
SET @columnList = 'first_name, last_name, city'
SET @city = '''London'''
SET @region = '''South'''
SET @sqlCommand = 'SELECT ' + @columnList + ' FROM dbo.employee WHERE City = ' + @city and 'region = '+@region
--...
How can we handle concurrency errors in LINQ to SQL?
...
How to fill multiple tables in a dataset.
I m using a query that returns me four tables.
At the frontend I am trying to fill all the four resultant table into dataset.
Here is my Query. Query is not complete. But it is just a refrence for my Ques
Select * from tblxyz compute sum(col1)
suppose this query returns more than one table...
I need an elegant way to implement credit-based purchases for an online store with a small variety of products which can be purchased using virtual credit or real currency. Alternatively, products could only be priced in credits.
Previous work
I have implemented credit-based purchasing before using different product types (eg. Credit, ...
This is a simple question yet I was unable to find any information at all about this.
Is it possible to have sub-schemas in SQL Server 2005/2008?
Example:
Having a HR (Human Resources) schema with a sub-schema called Training (with tables related to this). It would end up like HR.Training.* where * would be the tables.
...
Hi guys,
I have a project table with the following columns
ProjectID, ProjectDescription
and a list data table which has the following columns
ProjectID ListType Date Memo
Every project has many list type entries in the ListType Table.
What I want to do is run a query which will return something like this
ProjectID, ProjectDescri...
I have an MS SQL function that is called with the following syntax:
SELECT Field1, COUNT(*) AS RecordCount
FROM GetDecileTable('WHERE ClientID = 7 AND LocationName = ''Default'' ', 10)
The first parameter passes a specific WHERE clause that is used by the function for one of the internal queries. When I call this function in the fron...
I want to do some SQL Server performance testing and I want to establish a good baseline. I want to flush all the caches each time so that I know between each test it hasn't cached something so it performs better in between runs. Which DBCC commands should I use to make my SQL server as clean as possible?
...
I was writing a script that kept giving me errors. After tracking it down I found that the syscomments table stores its contents in multiple rows if the information gets to long past varchar(8000) i believe.
Why does the syscomments table break the data up into multiple rows instead of 1 single larger row? performance?
...
Scenario
I have the following methods:
public void AddItemSecurity(int itemId, int[] userIds)
public int[] GetValidItemIds(int userId)
Initially I'm thinking storage on the form:
itemId -> userId, userId, userId
and
userId -> itemId, itemId, itemId
AddItemSecurity is based on how I get data from a third party API, GetValidItemI...
This is most likely one for all you sexy DBAs out there:
How would I effieciently model a relational database whereby I have a field in an "Event" table which defines a "SportType"?
This "SportsType" field can hold a link to different sports tables E.g. "FootballEvent", "RubgyEvent", "CricketEvent" and "F1 Event".
Each of these Sp...
I've written an application that retrieves pricing and part options from a SQL database to generate a 3D Model of the product and create a sales proposal. My client likes it so much they want to be able to use it on laptops in the field now. The catch is, they won't have an internet connection.
I'm considering setting up a SQLite data...
I only have SQL Server 2008 (Dev Edition) on my development machine
I only have SQL Server 2005 available with my hosting company (and I don't have direct connection access to this database)
I'm just wondering what the best approach is for:
Getting the initlal DB Structure & Data into production.
And keeping any structural changes/da...
hi, am new in SQL programming.. and am using SQL 2000. my main problem is to connect the server to another PC running a VB6. pls help me.
...
In SQL server,How can i place the value of more than one column in variables using one query
Ex : My query is :
SELECT ET.ID,ET.Description,ET.DefaultTemplateText
FROM TBL_EMAILTEMPLATE ET
WHERE ET.NAME='OneWeekReminder'
I want to place the Column values in variables.
Thanks in advance for the help
...
Hello all,
I am using the SQL Server PHP Driver, I think this question can be answered without knowing what this is.
I have come across this many times, what does it mean by NAMES? Column names?:
SET NAMES utf8
Is there a query similar to the above that will get my dates to be returned as a string? For some reason on my SQL Sever 20...
Is there anything else that the code must do to sanitize identifiers (table, view, column) other than to wrap them in double quotation marks and "double up" double quotation marks present in the identifier name? References would be appreciated.
I have inherited a code base that has a custom object-relational mapping (ORM) system. SQL ...