Rahul Singla's Q&A profile
SQL Server Pessimistic locking
I am attempting to try a pesimistic lock, meaning that i want to lock a row or table for a period of time and then relase it when i am done. To test this i wrote the following: SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; BEGIN TRANsaction Select * From configurationitem WITH (ROWLOCK,xlock) where name = 'NextReceiptNumber' and category = 'AR'; Declare @i int set @i = 0 while @i < 300000 Begin print @i set @i = @i + 1 end COMMIT TRANsaction To test, while the above is looping i open another query window and select from the same table using the following: Select ConfigurationItemValue From configurationitem where ItemID = 418 This does not work because this query returns IMMEDIATELY. However, if I change the query to the follo ...Show All
.NET Development sql transaction
Hi, Could you please assist in using transaction in the following scenario In the datalayer the system loops through the records of a dataset, identifies the changes and then applies the necessary stored procedures for update, delete, insert. i.e. dataset data; foreach record in data if record is modified then call update stored procedure with the appropriate ID if record is added then call insert stored procedure with the appropriate details if record is deleted then call delete stored procedure with the appropriate ID A sample code for an action query is below: Notice that this is the kind of action for each record as explained above. The question is where to put the transaction please public void EmployeeDetailsDelete( ...Show All
SQL Server Implementation Question - MODE / MEDIAN - CACHE processing
Hi, I am about to implement MODE and MEDIAN as - more or less - custom aggregation functions by calculated members. Now I am concerned about the performance of my really big cube. Could I use CACHE to imporve performance An how is CACHE at processing time - if i process only parts of my cube (one Partition of one MG) is CACHE processed only for this part or for the whole cube I expect a Cubesize >= 50GB and never could process at all (and therefore want to be sure that the cache is only processed for the parts I process ) (expect 5 MG and 60 Partitions per MG) Best Regards HANNES MG....Measuregroup why where is it documented My local documentation and the online documentation still includes CACHE FUNCTION ...Show All
Visual C# connection string question
hi, I am trying to automate some reporting with excel and oledb and I am hitting a ssnag with my connections string when I save my excel file I do it like this: xlBook.SaveAs("C:\\Program Files\\Hawkeye Customs\\Ship Margin Reports\\Reports\\" + strFileName + ".xls", XlFileFormat.xlXMLSpreadsheet, 0, 0, false, false, XlSaveAsAccessMode.xlNoChange, 0, 0, 0, 0, 0); and my connection string looks like this (ported from my VB apps): MyConnection = new OleDbConnection( "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Program Files\\Hawkeye Customs\\Ship Margin Reports\\Reports\\" + strFileName + ".xls;Extended Properties=\"Excel 8.0;HDR=No;IMEX=0\""); What I realized is th ...Show All
SQL Server Export to PDF and print in landscape
Hello I have a report which I can print on legal paper, once I choose the landscape settings on print menu. When the same report is set to export to a file share in pdf format, it renders in portrait format. Is it possible to have the pdf document look like the landscape view so that the user can just hit print. Thanks Inder HI, In the report designer, click on the small square in the top left hand corner of the page so you can view the page properties. Now set the page size in the properties box to 29.7 width and 21 height. I can get screenshots if you need them ...Show All
Visual Studio Team System VS 2005 IDE Create SQL Store Porcedure like 2003 IDE
I use to have an option within the 2003 IDE to generate SQL Stored Procedures, however using the new 2005 IDE and SQLDataSource I can only generate dynamic SQL stagements or refer to existing Store Procedures. Can 2005 IDE generate SQL Stored Procedures If so how I have looked through the MSDN library and How to's for this. Doug DrDrain, You won't be able to create a stored procedure from the SQLDataSource wizard in VS2005. But from VS2005 IDE, you can create the stored procedure from Server Explorer (View menu-> Server Explorer). Connect to your database from the "Data Connections" node (by right click on it)->after connecting, go to the Stored Procedure folder for your database-> then right click on your S ...Show All
Smart Device Development Process does not exit when using Process.Start & WaitForExit
if i start another CF app using the following code in NetCF2.0 the app never exits, it just seems to hang Dim p As New Process Dim info As New ProcessStartInfo( "Sync.exe" , "1") p.StartInfo = info p.Start() p.WaitForExit() If i run the app manually or step through it then it exits as expected. It's almost like the WaitForExit is keeping it alive or something Any ideas Yeah I guess i'll have to do some more digging. I wrote a sample program with one form with a button on, when the button was clicked it fired off Sync.exe and called WaitForExit() and everything worked ok! Confused!! It could be something to do with the fact that the code that calls ...Show All
Visual Studio Express Editions Help with a school project.
I need help with an EAST project. My instructor wants me to create a transcript viewer for our school officew to use. She wants it to where you type in the students name and pick year of graduation and it displays the students transcript. The files need to be on the hard drive and in folders name by their year of graduation. I have the form layed out with a textbox for their name, a drop-down for the year, and a button for search. Will someone please help me from here or at least tell me how to do it So you need to create a file structure where this information is going to be stored. \<Year>\<Name>\Transcript.txt So the transcript file is always going to be called transcript.txt and is g ...Show All
SQL Server Adding folders in the solution explorer?
Hi.. Isn’t it possible to create sub folders in the solution explorer I have it hard time to create a decent structure inside the SSIS Package folder, since I have like 30 packages in my project. Is it just me being silly or cannot this be done Have a nice day /Erik ...Show All
Visual Studio Express Editions Click button to type
Hi all, How can I get letter or nember typed when I click a button, ie. if I have textbox1 and button1, can I click the button and get A or B, or even 1 or 2 typed or shown up in the textbox Thanks for helping a person who is stepping his first in VB. Private Sub button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click TextBox1.Text = "a" end sub ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 2D animation
I am trying to make some simple animation, like 5 frames. I have all the bmp files with the frames I want. How do I allow them to be animated in my game and how do I string them together. Yes a png file is probably the easiest format to create which supports transparency and RGB color. I remember seeing some posts about some animated sprite editors that people had in the works (generating png files) but I can't seem to find them now. ...Show All
Visual Studio 2008 (Pre-release) How can I make a mouseOver also cause a focus event?
For example, say I have a button. How do I make it so everytime I mouse over the button, it gives focus to it as well I got this to work in C# code behind but I'm wondering how to do this in XAML using a trigger Thanks. The weird thing is, I'm not seeing an exception thrown. The program just kind of locks up and then doesn't respond anymore... I usually don't write any explicit code to have an exception come up. Unless that's something I need to do (I usually let the debugger catch any exception thrown) ...Show All
Software Development for Windows Vista FindResourceW return null
i use the follow codes to get icon of exe file,why hRes is null HMODULE hExe = NULL; HRSRC hRes = NULL; HGLOBAL hResLoad = NULL; hExe = LoadLibraryW(bind_file_name); hRes = FindResourceW(hExe, MAKEINTRESOURCE(128), RT_GROUP_ICON); hResLoad = LoadResource(hExe, hRes); ....... ...Show All
Visual Basic application with self contained db
I wrote a vb.net application that uses sql server to store and retrive data. I want to mody this app so that it can have a self-contained db with no external db required. I don't know how to do this, but I know it can be done, can anyone steer my in the right direction. If you use a SQL Server database the client will have to have sql server installed or access to an sql server in order to use the db...To have a self-contained(meaning no external programs needed) then you must change your type of db...The easiest solution is to change over to an Access Database...If you use sql server to migrate the schema and data to access the only thing that you would have to do to your code is to use the oledb provi ...Show All
Visual Studio Express Editions hello again
Hi all could anyone please help with some code for a progress bar for a media player....... ie how do I know track length. etc thank you cheyenne can anyone convert this to read music track ........................................ Public Sub ReadFiles() ProgressBar1.Minimum = AvailableDiskSpace() ' Sets the progress bar's maximum value to a number ' ProgressBar1.Maximum = TotalDiskSpace() ' Dimension a counter variable. Dim i As Integer ' Uses a For...Next loop to iterate through the operations to be ' completed. In this case, five files are to be written to the disk, ' so it will execute the loop 5 times. For i = 1 To 5 ' Insert code to read a file into memory and update file size. ' Inc ...Show All
