|
Can we connect SQL Server 2005 to VSS directly or indirectly using Visual Studio 2005?
|
|
|
|
|
You need to create a VS2005 database project first I'm afraid.
|
|
|
|
|
Many times i came across situations where multiple users updates the same set of records at the same time simultaneously. And i also came across situations while i am selecting a set of 100 records another process should not pick the same set of records.How to Implement this???
Can anyone explain in detail about DB LOCKING and how to retaining DB Integrity..
Whether to apply in Application end while querying or at DB end. And how to test whether LOCKING is implemented or not???
Sathiya
|
|
|
|
|
|
Hi ,
I'm writing .Net Application that works with MS SQL 2005 , and I'm going to run this app on a Windows Server 2003 Operation System and Windows XP Clients , What should I do to deploy this app? Is it enough to Install the main app just in Server computer and then install prerequisites on Clients?Note that I connect to SqlServer using a unique Login and I'm not going to create a new Login for each client .I mean all clients must connect to server using ONE SqlServer Login. I need help on this subject ,
Thanks in advance .
|
|
|
|
|
You haven't explained what the architecture of your system is. Which parts of the system do you install on the server computer and which parts on the client machines?
If your architecture consists of a SQL Server database on your server and a .NET app installed on a number of client PCs, all you need to do is add a connection string entry to the App.config file for your client app that allows your app to connect to the database using the aforementioned SQL login.
Paul Marfleet
|
|
|
|
|
Thanks , Is it possible to just install .Net App on server and share it so that other clients can run it to avoid installing my .Net app on each client?
|
|
|
|
|
For a long time, the Tasks-Generate Scripts command in SSMS used to really annoy me, because I had to choose between creating DROP or CREATE scripts, and only had an optional IF EXISTS check.
Now I'm presented with a set of options that allows an IF NOT EXISTS, and DROP and CREATE in the same script. Am I going mad? What could have caused this change?
|
|
|
|
|
No seems quite sensible to me; these are used to stop you getting an errors by creating something that is already created.
|
|
|
|
|
It know it's more sensible, I just don't know when it changed and what updated caused it to change.
|
|
|
|
|
I have an SQL 2005 data table that has these coloumn;
Name Type
EventDate, DateTime
WaysideAddress, Nvarchar(50)
WaysideName, Nvarchar(50)
State, nchar(10)
AlarmMessage, Nvarchar(50)
What I am trying to do is count the total number of distinct AlarmMessage that each WaysideName reported from the table Grouped by EventDate and WaysideName.
The AlarmMessage is all text.
So the results of the query should look like this;
WaysideName|AlarmMessage|Count
Thanks,
|
|
|
|
|
Solved my own question;
SELECT DISTINCT WaysideName, ST, AlarmMessage, COUNT(AlarmMessage) AS Error_Count
FROM AlarmsList
GROUP BY WaysideName, ST, AlarmMessage
ORDER BY Error_Count DESC, ST, WaysideName, AlarmMessage
Thanks Everyone regardless!
|
|
|
|
|
Hi
I want to count the rows in a DataTable but it should ignore blank rows, I am trying something this,
string batchid = ds.Tables["No"].Columns[0].ColumnName;
ds.Tables[0].DefaultView.RowFilter = "" + batchid.Trim() + "=" + string.EmptyString;
int records=ds.Tables[0].Rows.counl;
the above code showing me following error.
Syntax error: Missing operand after '=' operator
Shahzad Aslam
Software Engineer
Email: shehzadaslam@hotmail.com
|
|
|
|
|
You are mixing up code with a string expression.
<br />
ds.Tables[0].DefaultView.RowFilter = "" + batchid.Trim() + "=''";
|
|
|
|
|
This is still not working and giving the following error:
Cannot perform '=' operation on System.Int32 and System.String.
Shahzad Aslam
Software Engineer
|
|
|
|
|
I've just had a very strange experience running a CLR stored proc. The procedure takes its data source connection from the context, and its destination connection string from the source DB. When I first ran the proc, I got back the error, "Keyword not supported: Provider", so I removed the provider clause from the destination connection string.
However, until I restarted my SQL server, I continued to get the same error. My ONLY action that resolved it AFTER correcting the connection string was restarting the server. This is plain scary if updating DATA, never mind code, requires a server restart.
|
|
|
|
|
OK, it turns out the dest. connection string is stored in a static field, and I only set its value from the database the first time it is read. SQL Server just keeps the class loaded 'forever', so every subsequent access returns the first value.
|
|
|
|
|
I wrote a stored procedure that looks like this.
CREATE PROCEDURE dbo.TEST
(
@Name varchar(50),
@Surname varchar(50)
)
DECLARE @ID int
INSERT INTO Table1
(
Name,
Surname
)
VALUES
(
@Name,
@Surname
)
SELECT @ID = SCOPE_IDENTITY()
The problem is that the SCOPE_IDENTITY() does not get the ID value.
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
Illegal Operation wrote: SELECT @ID = SCOPE_IDENTITY()
try SET @ID = (SELECT SCOPE_IDENTITY())
|
|
|
|
|
Does the table have an identity column?
Wout Louwers
|
|
|
|
|
Illegal Operation wrote: DECLARE @ID int
Here in your stored procedure you have Declared @ID as just a local variable. If you need that value to be returned by the procedure then you have declare it as a output parameter.
DECLARE @ID int OUT
[OR]
CREATE PROCEDURE [spTest]<br />
@ID int OUT,<br />
-- Other parameters here<br />
AS<br />
-- Your Insert Query Here<br />
SELECT @ID= SCOPE_IDENTITY()<br />
GO
Regards - J O H N -
|
|
|
|
|
i was just executing an update statement like this and that error occured..
it usually runs without error.. except for this specific data..
what does that "plan dates are invalid" mean?
thanx in advance again!!
UPDATE AJ_CONTRACTS
SET EXPECTED_SIGNOFF = '06/20/2008',
CONLEN = '20',EXTENDED = 'Y',
CONLEN_UNIT = 'M',
UPDATED_BY='apagustin',
UPDATE_DATE ='10/25/2007'
WHERE (CREW_SEQ_NO = '27979')
|
|
|
|
|
I've not seen that error message before. Try:- The date formats may be incorrect. Try using '20 Jun 2008' and '25 Oct 2007' instead.
- Double-check if there are any triggers defined on the table.
If these don't identify your problem then give us the exact error message (including error numbers).
Regards
Andy
|
|
|
|
|
Try swapping the date.
06/20/2008 to 2008/06/20
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
anthoy wrote: SET EXPECTED_SIGNOFF = '06/20/2008',
You can try this as well:
SET EXPECTED_SIGNOFF = cast('06/20/2008' as date)
It will force the string into a date (you will need to do the same with UPDATE_DATE).
You always pass failure on the way to success.
|
|
|
|