Tuesday, 26 September 2017

Read PDF document from database ~ gniithelp ~ programming info

Part of code that I use for reading a PDF document from database into Internet explorer.We first need one asp.net page with link . When we click on it we do Response.Redirect() to this page and send a parameter ID which we read in Page Load and use it to do simple sql query which will read a PDF data stored in it . (We store PDF as Byte array in data table column) . This time I will not post all the detail about it, if someone need more info let's message me and I will try to show...
Read More »

Searching string in all Store procedures in database ~ gniithelp ~ programming info

I'll show you how to do search trough all SP in one database to find a sting , text . It's very useful part of MS SQL code : SELECT ROUTINE_NAME, ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%user_name()%' AND ROUTINE_TYPE='PROCEDURE' select * from sysobjects o inner join syscomments c on o.id=c.id where c.text like '%user_name()%' Here...
Read More »

Asp.Net prevent Button Click until long time Insert Query done ! ~ gniithelp ~ programming info

In this post you will see how to do some simple prevention on Asp.net page button click until long time inserting query done. If you work a lot with SQL Store procedure, or other ways of T-SQL communication between your Asp.net page and database, it's so possible that you have to do some prevention when user try to insert or update some long data to SQL . With this line of code when user make first click button become a disabled until inserting,updating done!. protected void Page_Load(object sender, EventArgs e) { ...
Read More »

MSSQL : Update a column in one table with values from some other table ~ gniithelp ~ programming info

In this post I will show you one useful MS T-SQL Query. It's about updating a one column from one tables with values from some other table. The query : UPDATE t1 SET t1.column1= t2.column2 FROM dbo.someTable1 t1 INNER JOIN dbo.someTable2 t2 ON t1.joinColumn =t2.joinColumn We do simple update a column in table someTable1 alias t1 with values from someTable2, we do inner join...
Read More »

Fast export of AspxGridView data to Excel ,PDF ,CSV ,RTF file type C#,VB.NET ~ gniithelp ~ programming info

Hi to all of you who came in this place searching some info about programming . In this blog post I will show you how to do very, I mean very fast export of Your data from AspxGridView to Excel spreadsheet ( or PDF or CSV or RTF file type ). First...
Read More »