Showing posts with label click. Show all posts
Showing posts with label click. Show all posts

Friday, March 9, 2012

does enyone know...

Does enyone know how to get all byte[] from records in database.
When user click on the button to give him all record in some arhive??

Some code?(C#)

Thanx

OgaCould you ask your question in a different way, giving more explanation?|||In datatable I have field with type: "binary data", and I put into it some jpeg, doc, etc files. Then I have a web form with download button, when user click it i wont to give him all filesfrom that datatable.

I hope this explanation is better|||You might find this blog post (as well as the links it contains) to be helpful:

How to serve binary resouces from a database

Does DB Size decrease when I delete a huge table ?

Hi,
My DB size (Right click on DB Name, Data Files tab, Space Allocated field) was 10914 MB.
I delete a huge table (1.2 million records * 15 columns).
I checked the db size again. It didnt change.
Shouldn't it decrease because I delete a huge table ??The size will only decrease if you use the shrinkdb command.|||Originally posted by rokslide
The size will only decrease if you use the shrinkdb command.

When and why should we use Shrink DB ??|||Originally posted by rokslide
The size will only decrease if you use the shrinkdb command.

Would the deleted data be still on the database physical file ?|||The use of shrinkdb depends on who you talk to,... I really don't have a theory about it except to say that if the database is taking up too much space, shrink it...

As for the data still being in the database file... I would guess (and it's just a guess) that it would still be there but it would be unaccessible via the database. I think the delete would work much like deleting a file off your hard drive, all that is really deleted is the file header information, the data is still there, but you can't access it unless you use a tool to specificly locate the data.

Does that make sense? Can anyone else offer more advise??|||Originally posted by rokslide
The use of shrinkdb depends on who you talk to,... I really don't have a theory about it except to say that if the database is taking up too much space, shrink it...

As for the data still being in the database file... I would guess (and it's just a guess) that it would still be there but it would be unaccessible via the database. I think the delete would work much like deleting a file off your hard drive, all that is really deleted is the file header information, the data is still there, but you can't access it unless you use a tool to specificly locate the data.

Does that make sense? Can anyone else offer more advise??

Can u give a quick example of how I use ShrinkDB ?|||Originally posted by forXLDB
Can u give a quick example of how I use ShrinkDB ?
How do I know what size to reduce to ?
(If the size doesnt decrease even after deleting tables, how do i know what must be the exact size occupied by all the tables)...
I would have deleted and created lots of huge files involving around a million records atleast 10 times..

and above all, does the size effect the sql server performance in any way ?|||straight from the books online

This example decreases the size of the files in the UserDB user database to allow 10 percent free space in the files of UserDB.

DBCC SHRINKDATABASE (UserDB, 10)
GO

or you can do it through the EM|||Originally posted by rokslide
straight from the books online

or you can do it through the EM

i just did use for another test database, it shrunk more than half the size...

thx anyway !!1

Still looking for the answer on any performance degradation if the db file size is more ?|||Guessing once again I would say that it shouldn't affect the speed to any great extent,.. fragmentation of the database file would... there are some commands/functions that you can use to find out this kinda stuff but I have never used them so I can't really help alot I'm sorry.|||Originally posted by rokslide
Guessing once again I would say that it shouldn't affect the speed to any great extent,.. fragmentation of the database file would... there are some commands/functions that you can use to find out this kinda stuff but I have never used them so I can't really help alot I'm sorry.
thx again...

lemme know any functions !!!|||Since the log file takes the big size of the database, you can use the following script to reduce the file size:

USE DatabaseName
GO
DBCC SHRINKFILE ('DatabaseName_Log', Size)
GO

Here "Size" is the number of MB, i.e., if you put 100, that means the file will be shrinked to 100 MB.|||Since you are already working in em - when you right click on the database go to all task ->shrink database ->files... Under database file, look at the data file and log file. What is the current size/space used ? Are you backing up the database/transaction log ? What is the recovery model ?

What is the performance issue ?|||You can use "dbcc showcontig" to display fragmentation info. Yes performance will be affected - you need to either drop/recreate the indexes, use dbcc dbreindex or dbcc indexdefrag. Since you deleted so many records (more than half), fragmentation is a good start for performance issues.|||Do you have access to Books Online (BOL) ?|||An addition to rnealejr's post on dbcc indexdefrag and recreating indexes. If you have tables with a large amount of data input or modification take a good look at the indexes. If you use a non-seed value for your index then increasing the fillfactor number can help to reduce fragmentation in the future. I.E if your customer table uses first four characters of the name plus the zipcode for a customerID then you would be inserting new records into the middle of the table frequently. Once the fillfactor is used up then the next record inserted will create a new page and now your data is getting fragmented which does impact performance as mentioned be other posters.

Now that you've opened this pandoras box, you could spend a week in BOL learning how to tweak each tables index based on usage, calculating how many records fit on a page, use of varchar over char, benifits/penalties of seed indexes...............|||Originally posted by rnealejr
Do you have access to Books Online (BOL) ?
Yes. I can read BOL

Friday, February 17, 2012

document map

hi all -
i am trying to make a document map for my report. now correct me if i'm
wrong, but when i click on a link in the document map, the my
drill-down menus in my table should 'automatically' expand as needed.
well i can't get it to work. i have a bookmark ID set for the drilldown
parents in my table, and document map set on the grouping properties of
the table and and can navigate the document map just fine, but it
doesn't do anything with the table (like pull up relevant information).
any ideas on how to fix this?
thanks so much in advance and let me know if i totally confused you! i
can re-explain.I am having the exact same issue. Have you managed to find a solution?
"roadie.girl@.gmail.com" wrote:
> hi all -
> i am trying to make a document map for my report. now correct me if i'm
> wrong, but when i click on a link in the document map, the my
> drill-down menus in my table should 'automatically' expand as needed.
> well i can't get it to work. i have a bookmark ID set for the drilldown
> parents in my table, and document map set on the grouping properties of
> the table and and can navigate the document map just fine, but it
> doesn't do anything with the table (like pull up relevant information).
> any ideas on how to fix this?
> thanks so much in advance and let me know if i totally confused you! i
> can re-explain.
>

Tuesday, February 14, 2012

DoCmd.OpenReport WhereCondition prblms

I am trying to utilize two simple where conditions populated by a click on a listbox and on the second one a query window pops up with my selected variable?

For example I click on a listbox to get the "intPosCrnt" value and then click on another list box to get the "strStat" value. I display the the following string in a label box to see what is happening and it looks great. However, on the DoCmd a window pops up with the value I selected in the second listbox as the query name. Wow, what is happening?

strTest = "APPosID = " & intPosCrnt & " AND AppPos!Status = " & strStat

.DoCmd.OpenReport "AppPosStatus", acViewNormal, , WhereCondition:="" & strTestWhat's this AppPos!Status in your where condition. I don't think it should be there. Remove AppPos!.

-Ed

Do we know when Reporting Services finish the report??

Hi all,
I'm using Reporting Services with ASP .NET, user input report parameters in the web page then click submit, report will be display in an IFRAME in page. For a small report, things go fine. However, some reports need about a minute or 2 to finish, and during that time, all we can see is a blank rectangle frame... Because the code's only job is passing parameters to Reporting Services, no running status is displayed in the status bar. Sometimes our users think that the report contains no data, but it's actually running.
I was trying to put a "Please wait" button in the page, but the wait message runs only when the program was still in OnClick proc, which is not correct in this case because OnClick finished just in second...
Any way we can know when Reporting Services finish loading data to the frame, so we can display a message or status? Right now I have to put a text say: Report process will take up to 5 minutes, please waitBig Smile [:D]
Thanks,Use ReportViewer Control to show the Reports in ASP.NET pages.
http://www.odetocode.com/Articles/128.aspx
Regards,
Karthik.A|||

I'm using Report Viewer now. And that's why I have the problem. Whenever you push parameters to Reporting Services, Report Viewer "iframe" will be displayed right away, but first as a blank rectangle, then the data will appear. For a small report, the time is about a second or 2, but for some of my reports, you have to stare at that rectangle for a few minutes to see data...
And 'cause Report Viewer is loaded, no way (IMO) ASP page can know whether the data is displayed or not....
Anyway we can know when the data is displayed in the Viewer so I can tell the user?
Thanks for yr time, though

|||I am also using ReportViewer in my project.
what i did ,First invisible the ReportViewer and the time of assigning the path i make it visible.
and try using Collapsable panel of eworld.UI control.
Regards,
Karthik.A

|||But for a lot of processing, the report will not display data right after you assign the path. When you assign the path, you actually pass on the parameters, no data is available yet... My problem is after I assign the path, I make the Report Viewer visible and my sub finish; but it takes the report a few minutes to process all the SQL query then push data back to the page. In the mean time, all you see is a blank rectangle.|||yes u r correct
i too tried for the same.i also got the same problem.
i have facerd another problem
when i try to send a long parameter as Query string
it gives me an Error stating Query Parameter is too long exceds 256 Characters.
How can i overcome this.
please enlighten me.
Thanx,
Karthik.A
|||Well, for a parameter, I'm not really sure why you want to put too much data in it. 256 is fine for me. If I want to pass long string to the report, I rather put it in a db table, then have the report read it... I don't think execute 1 more SQL Select command hurts your performance...