|
Thanks for the reply "S".
I did search the registry (I looked for srcsafe.ini & part of my VSS db path) nothing found except sone history entries.
The article & tool link you provided is cool, but it will not help. It only removes VSS references from a particular VS solution. The Server Explorer is independent of any solution. I do not have a particular solution that is at issue, it is when I navigate to "Stored Procedures" under my server explorer window.
Thanks again.
Thanks,
-Len Miller
"If I had eight hours to chop down a tree, I'd spend six sharpening my axe."
-Abraham Lincoln
|
|
|
|
|
Hello,
I'm trying to run this code in SQL Server 2005:
DECLARE @UserId int
EXEC User_Insert @UserId = @UserId OUTPUT, @FirstName = N'Luis Alonso', @LastName = N'Ramos',
@PhoneNumber = N'whatever, @Email = whatever', @UserName = N'luisr',
@UserType = 5, @BranchId = NULL, @CreationUserId = 0, @CreationDate = N'31/01/2006'
EXEC User_SetPassword @UserId = @UserId, @PasswordHash = N'356A192B7913B04C54574D18C28D46E6395428AB' and I'm getting this error:
Msg 8114, Level 16, State 1, Procedure User_Insert, Line 0<br />
Error converting data type nvarchar to datetime.
The problem is with the last parameter, CreationDate . I don't know how to pass a literal date value (it works fine when called from code using parameterized queries.) If I use SQL Management Studio to generate the query for me, it's generated as above, and it won't work.
Even using @CreationDate = GETDATE() won't work, but with a different error.
Ideas?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
-- modified at 13:37 Tuesday 31st January, 2006
|
|
|
|
|
Try this.
<br />
DECLARE @UserId int<br />
DECLARE @dtNow DateTime<br />
Set @dtNow = GetDate()<br />
<br />
EXEC User_Insert @UserId = @UserId OUTPUT, @FirstName = N'Luis Alonso', @LastName = N'Ramos', @PhoneNumber = N'whatever, @Email = whatever', @UserName = N'luisr', @UserType = 5, @BranchId = NULL, @CreationUserId = 0, @CreationDate = @dtNow<br />
<br />
EXEC User_SetPassword @UserId = @UserId, @PasswordHash = N'356A192B7913B04C54574D18C28D46E6395428AB'<br />
Farhan Noor Qureshi
if (this == this) thow this;
|
|
|
|
|
Hi,
I have an c++application where the user enters the value of a"primary key" in a
Table via embedded sql. Is there a way of checking if the key already exists in the table. Thus I could show a message in the application to user that the value already exists. There for he would have to enter another one ?
Foxpro or mySql
Gerry
|
|
|
|
|
Hi,
1. How Can I transfer data stored on SQL 2000 with Operating System windows 2003 Advance Server to my PDA.
2. How can I get email with attachment (excel sheet)on my PDA.
|
|
|
|
|
Hi I am having trouble trying to figure out this sql query I need to display the opponents for a soccer team and display whether or not the team was at home or not at the moment I can display the two teams involved in the match and the stats I need but I don’t how to always get the other teams and display whether or not they were at home. This is my current query any help would be appreciated
Select homeClub.Name + ' v ' + awayClub.Name as Match, pz.DistanceCovered From Teams t
Join Person p on p.ID = t.PlayerID Join PZData pz on pz.TeamID = t.TeamID Join Match m on m.Id = t.MatchId
JOIN Squad homeSquad on m.SquadA = homeSquad.[ID]
JOIN Squad awaySquad on m.SquadB = awaySquad.[ID]
JOIN Club homeClub on homeSquad.ClubID = homeClub.[ID]
JOIN Club awayClub on awaySquad.ClubID = awayClub.[ID]
where t.ClubId in (select ClubID from Squad Where ID = 5)
and p.Id = 19
order by m.date asc
|
|
|
|
|
The only way you could get help with your problem is to list the following info:
1) A sample layout of a query result desired.
2) A list of the columns available in each of the tables.
Without this information we would only be guessing.
|
|
|
|
|
How to use session varibale using ASP?m Trying to create Secure webpages.But when user clicks on File->Send_>pgae as Email Attahcment,then pages go through but seession will not expir pls help me
regards
sumit
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
|
|
|
|
hi
I copied this sql query from msdn I am getting the following
Must declare the variable '@TheYear'
If i declare the value for the variable @TheYear I am getting the same error .Whats the matter with query any idea the query is below
SELECT o.customerid, od.orderid, SUM(od.quantity*od.unitprice) AS price
FROM Orders o, [Order Details] od
WHERE Year(o.orderdate) = @TheYear AND od.orderid=o.orderid
GROUP BY o.customerid, od.orderid
ORDER BY o.customerid
DECLARE @TheYear int
SET @TheYear = 1998
SELECT
CASE GROUPING(o.customerid) WHEN 0
THEN o.customerid ELSE '(Total)' END AS MyCustomerID,
CASE GROUPING(od.orderid) WHEN 0
THEN od.orderid ELSE -1 END AS MyOrderID,
SUM(od.quantity*od.unitprice) AS price
FROM Orders o, [Order Details] od
WHERE Year(orderdate) = @TheYear AND od.orderid=o.orderid
GROUP BY o.customerid, od.orderid WITH ROLLUP
ORDER BY o.customerid, price
sasi
|
|
|
|
|
Hello
sasire18 wrote: SELECT o.customerid, od.orderid, SUM(od.quantity*od.unitprice) AS price
FROM Orders o, [Order Details] od
WHERE Year(o.orderdate) = @TheYear AND od.orderid=o.orderid
GROUP BY o.customerid, od.orderid
ORDER BY o.customerid
DECLARE @TheYear int
SET @TheYear = 1998
you have to declare "@TheYear" before the query but you declared it after the query.
Pankaj Kulkarni
|
|
|
|
|
DECLARE @TheYear INT
SELECT o.customerid,
od.orderid,
SUM(od.quantity*od.unitprice) AS price
FROM Orders o, [Order Details] od
WHERE Year(o.orderdate) = @TheYear
AND od.orderid=o.orderid
GROUP BY o.customerid, od.orderid
ORDER BY o.customerid
SET @TheYear = 1998
SELECT CASE GROUPING(o.customerid) WHEN 0 THEN o.customerid ELSE '(Total)' END AS MyCustomerID,
CASE GROUPING(od.orderid) WHEN 0 THEN od.orderid ELSE -1 END AS MyOrderID,
SUM(od.quantity*od.unitprice) AS price
FROM Orders o, [Order Details] od
WHERE Year(orderdate) = @TheYear
AND od.orderid=o.orderid
GROUP BY o.customerid, od.orderid WITH ROLLUP
ORDER BY o.customerid, price
check now. it will work.
|
|
|
|
|
No. It won't.
You declare @TheYear, use @TheYear, and then SET @TheYear. What is the value of @TheYear in the first SELECT statement.
As the question was already answered correctly, I'm left wondering why you also answered.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
I actually got my answer from Pankaj
sasi
|
|
|
|
|
I've updated a connectionString manually on IIS and restarted Web site,
but previously working INSERT is not working to the new data source.
New connectionString is okay (see details below).
I know I can have multiple connectionStrings, but don't know
how to select one of them on the fly.
I don't know how to handle this situation.
Any help will be very appreciated.
Thanks in advance!
Eugenio
DETAILS:
I'm running an ASP.NET Web Service (IIS 5.1).
Web service INSERTs a couple of records successfully into a DataSet
created using DataSet Wizard on VS2005 to a SQLEXPRESS on local machine.
I've the same database on a remote SQLSERVER (that I can access thru
MS SQLServer Mgmt Studio Express), and wanna INSERT data to it.
So I manually changed Web.config to the new connectionString on IIS and
restarted the Web site that I'm using. Data obviously did not go to the
old database, but it did not go to the new too! (although my code haven't
thrown any exception). Data has been lost.
Second turn, I configured the code to use an ODBC System DSN to the
old and okay database. Worked fine. Changed the DSN settings to the
remote database (connectionString remained the same) as restarted
Web site on ISS. The same behaviour got before: data was lost!
Eugenio
|
|
|
|
|
Hi everybody!
I've got a problem: (C# 2005)
I'm writing an applitcation that menage a database. I want to use the timestamp method to make the update to the database. I've alreay added to each relation in my database a column with a timestamp value. I know i must modify the text of the update command in the table adapter but i dont know how...
please help me!
thank you in advance
Enrico
VentoEngine corp.
Program your life ^^
|
|
|
|
|
I'm using ADO to connect via ODBC. Somehow there are two connections being opened at the database server. At first I thought that the problem was connection pooling. After reading many articles from MSDN and others I have tried the solutions to no avail.
I have read that to turn off connection pooling in .NET you use Pooling=False in the connection string. In VB6 you use OLE DB Services=-4. I have also read of other folks using OLE DB Services=-2.
Our DB2 database vendor supplied us with Hummingbird BI-Query. (A modeling, query, reporting tool application). This app does not have the connection problems I am having. I contacted hummingbird for some help with the connection string. They had a trace log but that did not reveal the connection string.
When I step through the code there are 2 connections opened on the cn.Open method. When the cn.Close method is executed only one of the connections is closed. In .NET I have tried to force garbadge collection. This has not worked. However, when the .NET app closes the connection closes. The VB6 app does not do this.
As a test in in VB.NET very simply I do:
<br />
Dim cn As OdbcConnection<br />
<br />
cn = New OdbcConnection<br />
<br />
cn.ConnectionString = "DSN=MyDSN" _<br />
& "; uid=MyUID; pwd=MyPwd; Pooling=False"<br />
<br />
cn.Open()<br />
cn.Close()<br />
In VB6 very simply I do:
<br />
Dim cn As ADODB.Connection<br />
<br />
Set cn = New ADODB.Connection<br />
<br />
cn.ConnectionString = "DSN=MyDSN" _<br />
& "; uid=MyUID; pwd=MyPwd;OLE DB Services=-2"<br />
<br />
cn.Open<br />
cn.Close<br />
<br />
set cn = Nothing<br />
<br />
Thanks for your help,
Steve
|
|
|
|
|
We developed an asp .net application that connects to a sql database. To go live with the application we need to move the sql database to another server. How can this be done?
|
|
|
|
|
Two ways I can think of.
1. Detach the database move the files and then attach at the other end. (You'll then have to wire up the logins again as the login ids will be different because they are stored in the master db)
2. Create a backup of the database, move the backup file to the new system, then restore the backup (you'll again have to wire up the logins to accounts for the same reasons given above).
Personally, I'd go with the second option. I've had problems with the first option when it is being attached again and SQL Server declaring it as "suspicious". The second is also easier as the backup will place everything in one (very large) file, while the detach/attach will require you to move all the files.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Colin Angus Mackay wrote:
(You'll then have to wire up the logins again as the login ids will be different because they are stored in the master db)
what does it mean?? i mean how can this b done??
May God help u solv ur problems as well,thx in advance!!
|
|
|
|
|
|
Hi ALL,
I have a table where data is stored in a Hierarchical manner. For example
User1 supervise User2 and User3
User 2 supervises User3 and User4...
How can I loop through the hierarchy get all users supervised by user1 dynamically? That is in the example above (User1, 2, 3 and 4)?
|
|
|
|
|
Is User3 supervised by multiple people (User1 and User2) or that is just a typo?
Damodar Periwal
Software Tree, Inc.
Simplify Data Integration
http://www.softwaretree.com
|
|
|
|
|
I am using Datatable. I can get DataType but could not get SqlType.
-- modified at 7:20 Monday 30th January, 2006
|
|
|
|
|
I need to generate a sql 2000 db from a xml file how do a do this. I use sql 2000 and vb.net on vs2003
modified 2-Feb-21 21:01pm.
|
|
|
|
|
hi there ,
in my program i have the Order Form (win Form)
in this form i have some textbox and grid
know the grid is bound the a dataset on the grid i have some filds like productID,Qunataty,UnitPrice,Total
i am filling all the data on the Form and the order is insert well to the db
now if i want to change something in this particular order i select the order detiles from the db by OrderId num
an all the order detiles are displayd on the Form
the problem is when i want to add products to the order
the product detiles that is bound to the datagrid is updated but the OrderId is not
this is the code :
<br />
if(dsOrdersDetiles1.HasChanges()==true)<br />
{<br />
<br />
<br />
AdOrdersDetiles.Update(dsOrdersDetiles1.Tables[0]);
<br />
<br />
}<br />
how can i update order detiles when the filds are not bound ?
-- modified at 21:59 Saturday 28th January, 2006
|
|
|
|