|
Hi !
I already have VS.Net 2005.
Now i have the BIDS installed.
But i am new to BIDS.
Can you explain in detail how can i debug a Store Procedure using BIDS ?
It is very urgent.
Thanks.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Open BIDS
On top icons - select tools - connect to the database where sp exists.
Go to the location where sp is - right click on sp and step into the Stored proc.
You can provide the input string and set up break points - kind of similar to debugging in VS-2005
Hope that helps.
|
|
|
|
|
I tried what you told. There are a few problems -
1. When i click on BIDS from the Sql Server 2005, it opens VS.Net 2005
2. There is no option named "Step into Stored Procedure"
Is there any setting which i am missing ?
ALso the stored procedure was not built using VS.Net 2005. It is written in SQL Server 2005 only.
Any help will be appreciated.
Thanks.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Did you connect to the database and navigate to the sp - THEN - right click on sp - you should see this option.
|
|
|
|
|
Hi - I want to lock a table,data is then inserted and selected from this table, send to an application(thru sp) and then unlock the table.
I tried searching for some thing on web - unable to find it - maybe the syntax is incorrect?
Thanks.
|
|
|
|
|
|
hi
I am running an application wriiten in vc++.I have installed the
application at the remote client end
succesfully.Initaily set the DSN for Oracle (10g exe) .When I start
using application I get "oracle ODBC Driver Window" after regular
intervals.
why this window is appearing frequently when i set the DSN initally and
tested succesfully.
pls help!!!
|
|
|
|
|
Hi,
I am working on a forgot password module in which i have to send the mail having password to the user.I am using UserID,Email,IsApproved,IsVisible fields in my table.The module is working fine with sending mail on the basis of existing email of user.But i have to apply checks on the stored procedure that if the IsApproved and IsVisble fields are set to 0 by admin then the password would not be sent to the user and if IsApproved is 0 and IsVisible is 1 then do not send mail and if IsApproved is 1 and IsVisible is 0 then send mail.
I am using SqlServer2003 stored procedure.
Vivek Rathore
|
|
|
|
|
You can use IF condition in your stored procedure.
Best Regards,
Apurva Kaushal
|
|
|
|
|
vivek_r wrote: I am using SqlServer2003 stored procedure
I very much doubt that.
vivek_r wrote: I am working on a forgot password module in which i have to send the mail having password to the user
Personally, I think that is a bad idea. You should never store the password in a form where it can be sent via email. It is better to store the password as a salted hash which means that it can never be retrieved. Then, if the user forgets the password, it has to be regenerated.
vivek_r wrote: if the IsApproved and IsVisble fields are set to 0 by admin then the password would not be sent to the user and if IsApproved is 0 and IsVisible is 1 then do not send mail and if IsApproved is 1 and IsVisible is 0 then send mail.
SELECT columns
WHERE Email = @email
AND IsApproved = 1
The logic is very simple. You have stated that if IsApproved is 0 then do not send the email, and IsVisible is unimportant (reread what you wrote if you think that is an incorrect interpretation)
IsVisible IsApproved Send Email
0 0 No
0 1 Yes
1 0 No
1 1 Doesn't say: likely yes
|
|
|
|
|
Dear Colin,
You are saying very much right that the IsVisible field does not mean at all.
A short while ago i got the same answer as urs was.
Thank you very much for your suggestion.
Thanks and Regards
Vivek Rathore.
Vivek Rathore.
|
|
|
|
|
Dear friends,
How can I take the backup of SQL server database through coding, and I want to restore it through coding. The database must be kept as a text file. And shuld be able to restore it.
And how can I import and export the SQL server data in to MS-Access mdb file. Please advise me, or give me some code snippet if possible.
-- modified at 3:06 Friday 29th December, 2006
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
indian143 wrote: How can I take the backup of SQL server database through coding, and I want to restore it through coding.
You can issue virtually any command you like through SqlCommand including the BACKUP and RESTORE commands.
indian143 wrote: The database must be kept as a text file
Why? That is a very inefficient format to store a backup of a database in.
|
|
|
|
|
i want to know how to find size of database
used space in files,used space in logs,free space for files,
free space for logs,unused space
thanx
manish
|
|
|
|
|
I have to fill a survey form with data from an oracle database.
We debate two ideas: use a dataset object or a XML file.
For XML file I would use forward only method of reading the file and not DOM, faster.
Is it more efficient generating the XML from database and then parsing the XML on the application server then using a data set returned from the database ?
Thank you
|
|
|
|
|
Hi,
I am working in ASP.NET. I need to get the list of Servers registered on the local machine. How can I get this??
regards
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
I haven't seen a pure ADO.NET solution for this (I guess this is what you're looking for) but if you can't find such a solution there as an alternative way..
SQLDMO object! Here SQLDMO.Application you'll find a method called ListAvailableSQLServers! Just add a reference to your project and create an instance of it and you've got your list.
|
|
|
|
|
thanks,
I tried it but it is returning 0 servers. Why is this so? I am using Windows XP and SQL Server 2000.
regards
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
There are several possible reasons for this..
The database might be hidden - to check open sql manager and select the properties by right clicking on the protocols node of the db instance. Look for "HideInstance"..
It could also be that you're running into a latency problem, if your server isn't responding fast enough you won't see it. But it would say this is unlikely on "localhost"!
If this still doesn't help, you might want to use a workaround. You could easily enumerate this registry key: SOFTWARE\Microsoft\Microsoft SQL Server - InstalledInstances
|
|
|
|
|
Thanks for your quick help...
i tried SOFTWARE\Microsoft\Microsoft SQL Server - InstalledInstances, but it doesnt contains Server Information registered in a SQL Server Group. How can I get that ?
regards
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
Can this be done running in the normally restricted rights of an IIS client?
|
|
|
|
|
Problem Description:
ADO .Net transaction fails for distributed databases and also even for a simple SQL Query that uses Dblink to Connect Oracle 8i.
When we fetch (query) data in SQL Server 2000 using dblink and connect to Oracle 8i and if this entire query is with-in ADO .Net transaction, then it fails. But the same query works fine without transaction.
Sample SQL query using DBLink in SQL Server.
Oracle Server Name for example: ORADB
Stored Procedure Name: UseDBLinkSP
SELECT * FROM [ORADB].SchemaName.TableName WHERE condition
Sample code in C#:
SqlConnection sqlCon = GetConnection ();
sqlCon.Open();
SqlTransaction trans = sqlCon.BeginTransaction();
try
{
DataAccessClass.getRecords(UseDBLinkSP, trans);
trans.Commit();
}
catch(Exception ex )
{
trans.Rollback();
throw ex;
}
finally
{
if (sqlCon != null && sqlCon.State != ConnectionState.Closed)
{
sqlCon.Close();
}
}
.
l Please note that we are only fetching information from the oracle database, but no updations or deletions.
l This is a sample code, in reality above and below dblink query we have couple of SQL Server Stored procedures that will insert/update/delete data in SQL Server also.
When we run the above code in C# or even in SQL Query Analyzer with Begin and CommitTrans it gives this error.
Error Message:
サーバー : メッセージ 7391、レベル 16、状態 1、行 2
OLE DB プロバイダ 'OraOLEDB.Oracle' は分散トランザクションを開始できなかったので、要求した操作は実行されませんでした。
[OLE/DB provider returned message: New transaction cannot enlist in the specified transaction coordinator. ]
OLE DB エラー トレース [OLE/DB Provider 'OraOLEDB.Oracle' ITransactionJoin::JoinTransaction returned 0x8004d00a]
Environment:
1. .NET 1.1
2. ADO .NET 1.1
3. Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1) 0
4. Oracle 8i on Unix box.
|
|
|
|
|
wrote: This is a sample code, in reality above and below dblink query we have couple of SQL Server Stored procedures that will insert/update/delete data in SQL Server also.
Do you get the same problem with the sample code also? If not then the code above is not valid and does not help solve your problem.
wrote: Error Message:
サーバー : メッセージ 7391、レベル 16、状態 1、行 2
OLE DB プロバイダ 'OraOLEDB.Oracle' は分散トランザクションを開始できなかったので、要求した操作は実行されませんでした。
[OLE/DB provider returned message: New transaction cannot enlist in the specified transaction coordinator. ]
OLE DB エラー トレース [OLE/DB Provider 'OraOLEDB.Oracle' ITransactionJoin::JoinTransaction returned 0x8004d00a]
I don't fully understand the erros message, but it appears to be with Oracle not SQL Server. There is no oracle specific code in the "sample" C# code you have provided. This suggests that the sample is not representative of the problem and therefor invalid.
If the link to Oracle is being made within SQL Server, rather than your C# application. You could attempt to BEGIN and COMMIT TRANSACTION within the stored procedure.
|
|
|
|
|
Appreciate Mackay for your quick and valuable response.Now I totally understood the concept.Can you please help me out for the following query.
-->In Oracle we have the following concept.
SET TRANSACTION READ ONLY;
SELECT * FROM ORDERS;
SELECT * FROM BALANCES;
COMMIT;
If the above thing is correct.Can we handle the same in C# application.If so how can we do that.Awaiting for your response
shaikshavali
-- modified at 12:00 Wednesday 27th December, 2006
shaikshavali.M
|
|
|
|
|
Hi,
I am writing a stored procedure.
I want to update the records in a table.
till i complete the updation of records I want to lock the table and once i complete the updation i want to release the lock on the table.
during the process of updation of records i don't want any other methods to access this table.
How to achieve this
Regards,
Uma
|
|
|
|