Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Friday, March 30, 2012

Receiving Export file name

Hello,
I work with Crystal in Visual Studio 2005.
Is it possible to receive the export file name after the report viewer finished exporting?I think it is not possible. It is also not possible to figure out which format was used for exporting, which optional parameters were used etc.
If I needed that information, I would probably create my own form for entering export file name and export options.

Monday, February 20, 2012

Real time "live" data on a windows application .NET 2.0

I want to build a windows application in Visual Studio 2005 that grabs some data from a SQL DB and displays it in a gridview. That is easy and I already have it done, but I also want to know how to show this data in real-time. For example: right now we have a application that pulls some login information for all the users and displays their phone extension, their name, and their status. They can change their status by clicking on some radios below the datagrid and on change it updates the data and then posts back. However, I dont know how the guy who did it made it so that these local changes are automatically shown on everyone elses computers around the office. In other words, they are shown the live data as it changes, without having to refresh it or anything. How would I go about doing this or does anyone have any places/resources that could help me accomplish this task. Thanks.

Oh and the guy who wrote this is no longer working here and he deleted the source code so i cant look at it.

Here's the answer I got from one of our Dev:

there are two methods, a push method or a pull method: you could use something like NotificationServices (I haven't used this. There's some data on it athttp://msdn2.microsoft.com/en-us/library/ms170722(en-US,SQL.90).aspx) to tell you that the data has changed, or you could poll at intervals (or during lulls in processing time) for changes in data.

Either way you go, you're going to face problems of collisions if the users can change the same data. What would you do if you're in the middle of editing a row, and another user deletes it, and you poll for data?

Hope that helps,

Lan

|||

thanks for the reply. the application is designed to only allow the user to change their own data, therefore there will be no way that any user can be changing the same data. I will take a look at that article.

'Real only' Cells in SQL Server Management Studio / VS 2005

I have been using both SQL Server Management Studio and the Server Explorer of Visual Studio 2005 to populate my database tables as I write my application. Basically, I right-click on a table name and select "Open Table' in SMS and select 'View Table Data' in VS 2005. From there I normally just edit data as needed.

Today, I open up a particular table and one column of my table is made read-only, meaning I cannot update that cell in any records and I cannot add any new records. I can tell this column is read-only because the data is faded and 'Cell is Read only' is visible in the status pane under the results when I mouse-over that column. These read-only columns seem to pop-up almost at random. At work the other day a similar thing happened to anther table I was trying to modify.

It just so happens that the read-only column is the Primary Key of this particular table, but even when I remove the Primary Key designation I cannot edit data in this column. In addition, I have other tables with Primary Keys and I have no trouble updating data in those table columns.

This most certainly has me pulling my hair out and have been searching online for two days now trying to find the cause of this. Any help would be appreciated.

IMHO editing data directly to the table using the SSMS or VS has always downside for having issues with data commit. You will be able to control the transaction commit or rollback is the biggest advantage in using TSQL instead. THe behaviour you are getting is opening up in VS is considered as a view where updates are not allowed, fyi http://msdn2.microsoft.com/en-us/library/ms172022(VS.80).aspx and may be look at the properties to see update speicification to set it to UPDATE.

|||Thanks for the reply. According to this http://msdn2.microsoft.com/en-us/library/sb0bay6k(VS.80).aspx I'm doing it exactly as they explain. At this point I just want to insert a farking row and I don't care how I do it. I've tried to write straight queries and can't even get that to work. I've written command line queries for 4 years now so I know how to write SQL, but I've been screwing with this application for 2 days now just trying to insert a row, its beyond ridiculous. I still cannot find a single resource online that explains to my why I have an entire column that is read-only.

Someone for the love of God just tell me how to insert a row using this steaming pile of BS called Micrrosoft SQL Server Management Studio (or VS 2005). I have a table that looks like this:

StatID int (Primary Key)
SeasonCode char(4)
PlayerID int
StatCode char(3)
StatValue float

and all I want to do is insert a record. Someone please tell me how the fark to insert a row into this table. I don't care what it takes. The column StatID has its Identify Specification column set to 'Yes'.
|||

I had the exact same problem and found out what was causing it in my case.

I started with 'Open Table' which I then wanted to filter so I opened criteria pane. This showed '*' in the columns selected - fine, that's what I expected.

I then selected a specific column to create a filter but didn't bother to unclick the 'display' column and that column became Read Only in the results set.

When I unclicked the 'display' option for the filtered column, and executed it again, the column was editable.

I haven't had time to play around with this but it looks to me that SSMS cannot handle editing on a column that is displayed twice.

Don't ever remember having that problem in EM.

|||

When I unclicked the 'display' option for the filtered column

I meant the 'Output' option