I am not sure all information 100% correct. Some information getting from internet sites. Main theme of this blog is own reference....
Saturday, 30 November 2013
Tuesday, 26 November 2013
select text in textbox on focus in asp.net
<!DOCTYPE html>
<html>
<body>
<form action="demo_form.asp">
First name: <input type="text" name="FirstName" onfocus="return this.select();" value="Mickey"><br>
Last name: <input type="text" name="LastName" value="Mouse"><br>
</form>
</body>
</html>
<html>
<body>
<form action="demo_form.asp">
First name: <input type="text" name="FirstName" onfocus="return this.select();" value="Mickey"><br>
Last name: <input type="text" name="LastName" value="Mouse"><br>
</form>
</body>
</html>
Thursday, 17 October 2013
concat array string with comma
string[] ids = {"2343","2344","2345"};
string idString = String.Join(",",ids);
Response.Write(idString);ref developerfusion.comRemove duplicates from array
int[] s = { 1, 2, 3, 3, 4};
int[] q = s.Distinct().ToArray();
ref: http://stackoverflow.com/questions/9673/remove-duplicates-from-array
Tuesday, 8 October 2013
Crystal Report 8.5 with SQL Temp Table(no rowset was returned for this table, query, or procedure)
We have a stored procedure (SQL Server 2005) for a crystal reports report (8.0).
Part of this stored procedure is a fetch which combines all kind of data and puts it into a temporary table.
Then a selection is made from this temp table (usually everything is selected) and this selection is the result of the SP.
The SP works fine when called in SQL Server.
However when I want to use this SP in a CR report, it won't work.
When trying to put it into the report, it gives the message: "no rowset was returned for this table, query, or procedure."
According to one of my colleagues, this is because CR doesn't like temp tables.
However, when I leave out the temp table stuff, I get the results from the fetch, which are a dozen separate results.
When I try putting this in a CR report, it only takes the first result.
Is there a way to combine the separate results from the fetch into a single recordset, without using a temp table?
SOLUTION:
Part of this stored procedure is a fetch which combines all kind of data and puts it into a temporary table.
Then a selection is made from this temp table (usually everything is selected) and this selection is the result of the SP.
The SP works fine when called in SQL Server.
However when I want to use this SP in a CR report, it won't work.
When trying to put it into the report, it gives the message: "no rowset was returned for this table, query, or procedure."
According to one of my colleagues, this is because CR doesn't like temp tables.
However, when I leave out the temp table stuff, I get the results from the fetch, which are a dozen separate results.
When I try putting this in a CR report, it only takes the first result.
Is there a way to combine the separate results from the fetch into a single recordset, without using a temp table?
SOLUTION:
SET NOCOUNT ON for your temp table.
ref: http://galahtech.stinkbugonline.com/forum/index.php?topic=12967.0
Friday, 20 September 2013
Access SQL Server using Public IP
If we have Public IP (100.200.105.205) we can access sql server over internet.
First we need to run the sql browser services, then, enable TCP/IP in sql configuration tool.
Images from
http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx
then we need to give the port number 1433
we need to add 1433 port in external firewall (if we using) and in windows firewall
After this ,
we can access sql server using public ip without instance name.
if we using OLEDB connection type, we need to give the port number also.
it looks like xxx.xxx.xxx.xxx,1433
Tuesday, 17 September 2013
Sort Control in Crystal Reports 2008?
Source:
http://www.maximumimpactsolutions.co.uk/blog/comments.asp?bd=149
In Crystal Reports 2008, a new feature, the Sort Control, has been added
The Sort Control, not only allows the end-user to sort the report by a number of fields, but also in ascending and descending order.
There are two ways that the sort control can be added to a report:
Solutions:
To add a sort control directly to the report:
To attach a Sort Control to a Report Field:
http://www.maximumimpactsolutions.co.uk/blog/comments.asp?bd=149
In Crystal Reports 2008, a new feature, the Sort Control, has been added
The Sort Control, not only allows the end-user to sort the report by a number of fields, but also in ascending and descending order.
There are two ways that the sort control can be added to a report:
- Directly added to the report, or
- Assigned to a field heading of the report
Solutions:
To add a sort control directly to the report:
- Create the required report
- From the report menu, select the Record Sort Expert option
- In the Record Sort Expert dialog box, add the required fields for the sort controls:
- Press the OK button
- From the Insert menu, select the Sort Control option
- In the Sort Control dialog box, select the required field:
- Press the OK button
- Click and drag on the in the required report section, to draw the Sort Control
- Double Click on the sort conrtol text box, to enter the label for the conrtol
- Click anywhere on the report to exit
- Press the Up or Down sort control button to sort the report
To attach a Sort Control to a Report Field:
- Create the required report
- From the report menu, select the Record Sort Expert option
- In the Record Sort Expert dialog box, add the required fields for the sort controls
- Press the OK button
- Right click on the field heading object, select the Bind Sort Control option
- In the Sort Control dialog box, select the required field:
- Press the OK button
- Press the Up or Down sort control button to sort the report
Subscribe to:
Posts (Atom)