I am a beginner in using Asp.NET with C# and it is my first time I am trying to establish a connection with an SQL server 2005 database:
Here is my simple code to connect to the sql server database,I am getting the text message set in the label. Is my problem in the connectionString ??? if so please show me examples how to write it and ...
Using SQL Server 2005
I have a table with the following columns
id
name
date
value
I would like to select all rows from the table where there are not four consecutive zeroes by date. How would I do that? Below is an example of what I mean.
id name date value
1 a 1/1/2010 5
2 a 1/2/2010...
Dear folks,
I have a database of 40 tables. I want to track the changes and keep record of every change made in database. what would be best option ?
Note: i am using MS SQL Server 2005.
i have tried following code for Change Tracking
ALTER DATABASE Customer
SET CHANGE_TRACKING = ON
(AUTO_CLEANUP = ON , CHANGE_RETENTION = 5 DAYS)
bu...
I have an asp.net web page used to search for company names in our database using FTS. They enter the company name in a search box and submit.
First I trim any leading or trailing spaces, then i replace each internal space with " NEAR ".
So a search for:
"The Association of Lefthanded Picklepickers"
Is fed as:
"The NEAR Associ...
Hi,
First off, I can connect to both databases with SQL Server Enterprise Manager, so I know the servers are up and available. One of them is SQL1, the other is SQLTEST.
In my program when I use the following connection string, it work connects just fine:
conn = New DBConnect("Data Source=SQL1;Initial Catalog=SignInspection;Integrated...
Getting this warning when trying to setup a transactional replication. This error occurs when setting up a subscription from sql server express using non impersonated login to the distributor. this works using sql server developer subscrption to sql server workgroup publication but not from sql express to sql workgroup. Im not sure if it...
Can anyone point me to a list/description of standard @RETURN_VALUES in SQL Server 2005 (if such a thing exists)? I have searched multiple times and can't find any reference. Interestingly, I was debugging a stored procedure earlier today using Visual Studion 2008 and received this in the results--"@RETURN_VALUE = -6". Wondering what ...
I can see how to turn off row level and page level locking in SQL Server, but I cannot find a way to force SQL Server to use row level locking. Is there a way to force SQL Server to use row level locking and NOT use page level locking?
...
Hi,
Can anybody please let me know that where do the trace flag results get saved to.
Thanks
...
how would i like to convert accounting GL number
99999999999999999
to
999-99999-99-9999.999
in a query to MSSQL server 2005
i dont need to update the data, just have the STRING be converted on query.
Table: GLM_MASTER__ACOUNT
Field: Account
thanks.
...
I'm building a Content Management website which will also include other features. When an admin member deletes an item through the admin panel, I would like this item to be moved to a 'recycle bin' for 30 days (then automatically deleted).
What is the best way of implementing this feature?
One idea I had was to have a 'Deleted' bit col...
Hi I m importing Data from Excel to SQL Server 2005. It is Working fine. The problem is
1) In one full column of Excel i have some Raw information how to spilt those information and store in SQL fields.
2) There is Single quotes (') in many fields so how to convert those to as something like ('') before taking to SQL.
...
Is there a way to trigger a job on a from another job on a remote server without using Linked Servers?
The reasoning is that the job being triggered executes an SSIS package on 2008. The calling job resides on a 2005 server, so cannot execute the job directly.
The servers are not linked, and I was hoping there was a way to call one f...
I have noticed a number of queries at work and on SO are using limitations in the form:
isnull(name,'') <> ''
Is there a particular reason why people do that and not the more terse
name is not null
Is it a legacy or a performance issue?
...
HI ALL,
I am using sql server express to store some data but it also store spaces with data. for example if a have a nchar(20) column in a table and i store "computer" (8 characters) to this column, then remaining character (20-8=12) is filled with blank spaces. Is there any way to over come this problem. Because when I shows this data ...
Hi, I'm trouble shooting an SSIS package that is failing. When I execute the package it runs 1st step but fails at the second step with the message "Execution of the job "XXXX" failed. See history log for details, history log has very little information there. Is there a way to see an exact error or generate log file with meaningful info...
Hello,
The following query returns no result and no error on SQL Server 2008 (tested on SP1), you can run it against any database, even master:
WITH computed_table (id) AS
(
SELECT id FROM this_table_does_not_exist
)
(SELECT * FROM computed_table)
UNION
(SELECT * FROM another_table_that_does_not_exists)
On SQL Server 2005, you ge...
We have an SSIS package that is launched from a web service. In the Dev environment, everything works fine, but in the QA environment I get the following error when trying to run the package: "Failed to acquire connection [ConnectionName]. Connection may not be configured correctly or you may not have the right permissions on this conne...
Here's the scenario:
I have a table with 3 columns: 'KeyColumn', 'SubKeyColumn' and 'BooleanColumn', where the first two are the primary keys of the table.
For my query, I'd like to count the number of rows there are for any given value in 'KeyColumn', and I'd also like to know which ones have a value of true for 'BooleanColumn'. My i...
I am tryin to get a column from DB that returns Variable Column Name which depends on Row data. I know I can have variable Column name with using Dynamic SQL, but what if the name actually depends on the row's information.
SELECT name,age FROM dbo.Names
--Reurns 'name' as column name
SELECT name as [xyz],ag...