Cyberiafreak

"Fortunate are those who take the first steps.” ― Paulo Coelho

What’s new in ASP.NET Whidbey ??

Advertisements

January 28, 2005 Posted by | Computers and Internet | Leave a comment

Update code – ADO.NET – Manually tried

 Here is the code, which i want for my appln. so for i have used only webmatrix to generate all codes. here is, manually written code for my appln.salesport

 ‘Dim ss As Integer
        ‘Dim ra As Integer
        ‘Dim con As New SqlConnection()
        ‘Dim con_str As String
        ‘con_str = Session("CS")
        ‘Try
        ‘    con.ConnectionString = con_str
        ‘    con.Open()
        ‘    Dim cmd As New SqlCommand("Update loss_of_contract Set UPDATED=’UPDATED’,agency_name=’mk’, agency_id=1,others_name=’mk1′,reason=1,rate_ss=1,rate_sg=2,rate_si=3,rate_so=4,rate_gm=5,rate_oth=6,remark=’something’ where C_ID=’1’" & cltid.Text, con)
        ‘    ra = cmd.ExecuteNonQuery()
        ‘Catch SQLExp As SqlException
        ‘    If SQLExp.Number = 1212 Then
        ‘        Response.Write("SQL Server Error 1212 Occurred: " & e.ToString())
        ‘    Else
        ‘        Response.Write("An SQL Server Error Occurred: " & e.ToString())
        ‘    End If
        ‘Finally
        ‘    con.Close()
        ‘    If (ra) Then
        ‘        Response.Write("1 ROWS AFFECTED – SUCCESSFULLY")
        ‘    End If
        ‘End Try

Mahesh kumar.R

25/1/2005 -SIS India Ltd

 

January 25, 2005 Posted by | Computers and Internet | Leave a comment

ASP.NET 2.0 Internals ???

Here is the place to know more about the internals of asp.net appln and compilation…Very good one.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/internals.asp

copied from BDOT NET group mail.

====

January 25, 2005 Posted by | Uncategorized | Leave a comment

Interview Questions – for Microsoft technolofy[experienced]

Interview Questions – from groups [ .NET questions ]
=======================================
> 1 Differnt Types of Indexes and thier Diff?
> 2 Stored Procedure Adv and DisAdv?
> 3 Performance issues on DataBase(Sql server)?
> 4 Diff TSQL and ANSI SQL?
> 5 Different Tools in SQL Sever?
> 6 What is Complex Stored Procedure
> 7 Normalization
> 8 Cursors types?
> 9 What is different between EXEC and SP_ExecuteSQL
> 10 How to avoid Cursors?
> 11 Segregate Functions in SQL Sever?
> 12 what is Replication?
> 13 what is Profiler?
> 14 How do u monitor the Performance of ur Query?
> 15 Isolation levels in SQL Server?
> 16 3 Major Diff bet’n ASP and ASP.NET?

——————————–
1.Differnt Types of Indexes and thier Diff?
cluster index: The way of storing records in physically, It referes
the Primery key
nonclusterindex: The way of storing records in logically, It referes
the forginkey,we have 249 noncluster indexes
2 Stored Procedure Adv and DisAdv?
Adv: They allow modular programming.
They allow faster execution.
They can reduce network traffic.
They can be used as a security mechanism.
disadv: there is no automatically execution.

3 Performance issues on DataBase(Sql server)?
aviod the simple cursors
4 Diff TSQL and ANSI SQL?
This can reduce network traffic, because your client will not receive
the message indicating the number of rows affected by a T-SQL
statement.

5 Different Tools in SQL Sever?
6 What is Complex Stored Procedure
When used in a stored procedure, the RETURN statement can specify an
integer value to return to the calling application, batch, or
procedure. If no value is specified on RETURN, a stored procedure
returns the value 0. The stored procedures return a value of 0 when
no errors were encountered. Any nonzero value indicates an error
occurred.

7 Normalization
The process of refining tables, keys, columns, and relationships to
create an efficient database is called normalization. This should
eliminates unnecessary duplication and provides a rapid search path to
all necessary information.
Some of the benefits of normalization are:
Data integrity (because there is no redundant, neglected data)
Optimized queries (because normalized tables produce rapid, efficient joins)
Faster index creation and sorting (because the tables have fewer columns)
Faster UPDATE performance (because there are fewer indexes per table)
Improved concurrency resolution (because table locks will affect less data)
Eliminate redundancy

8 Cursors types?
Cursors allow row-by-row processing of the result sets.
Types of cursors: Static, Dynamic, Forward-only, Keyset-driven
9 What is different between EXEC and SP_ExecuteSQL
SP_ExecuteSQL : for automaticaaly executes stored procedure when SQL
server starts
EXEC : manual execution

10 How to avoid Cursors?
By tunning
11 Segregate Functions in SQL Sever?

12 what is Replication?
Replication is the process of copying/moving data between databases on
the same or different servers. SQL Server supports the following types
of replication scenarios:
Snapshot replication – It distributes data exactly as it appears at a
specific moment in time and doesn’t monitor for updates. It can be
used when data changes are infrequent. It is often used for browsing
data such as price lists, online catalog, or data for decision support
where the current data is not required and data is used as read only.
Transactional replication (with immediate updating subscribers, with
queued updating subscribers) – With this an initial snapshot of data
is applied, and whenever data modifications are made at the publisher,
the individual transactions are captured and propagated to the
subscribers.
Merge replication – It is the process of distributing the data between
publisher and subscriber, it allows the publisher and subscriber to
update the data while connected or disconnected, and then merging the
updates between the sites when they are connected.

13 what is Profiler?
14 How do u monitor the Performance of ur Query?
using Joins
15 Isolation levels in SQL Server?
16 3 Major Diff bet’n ASP and ASP.NET?
asp is not data driven,where as can
asp have only onc cache type where as three
asp is not data randring process where as can

January 17, 2005 Posted by | Computers and Internet | Leave a comment

Office code – Manually written code for Update ADO.NET

‘Dim dt As DateTime
        ‘dt = Convert.ToDateTime(mm.SelectedItem.Value.Trim + "/" + dd.SelectedItem.Value.Trim & "/" & yy.SelectedItem.Value.Trim)
        ‘Dim ss As Integer
        ‘Dim ra As Integer
        ‘Dim conn As New SqlConnection("server=ADMIN-SERVER;uid=sa;pwd=adminsis;database=salesport")
        ‘Try
        ‘    Response.Write(clt_add.Text)
        ‘    Response.Write(Session("SCLT_ADD"))
        ‘    conn.Open()
        ‘    Dim cmd As New SqlCommand("Update pcl Set clt_add=’" & clt_add.Text & "’ where pcl_id = 8 ", conn)

        ‘    ra = cmd.ExecuteNonQuery()
        ‘Catch SQLExp As SqlException
        ‘    If SQLExp.Number = 1212 Then
        ‘        Response.Write("SQL Server Error 1212 Occurred: " & e.ToString())
        ‘    Else
        ‘        Response.Write("An SQL Server Error Occurred: " & e.ToString())
        ‘    End If
        ‘Finally
        ‘    conn.Close()
        ‘    If (ra) Then
        ‘        Response.Write("1 ROWS AFFECTED – SUCCESSFULLY")
        ‘        Response.Write("11 rows affected")

        ‘    End If
        ‘End Try

-============————-

Mahesh,SIS India

January 12, 2005 Posted by | Uncategorized | Leave a comment

Windows Services For Unix (SFU) – Seminar

Once again a good seminar from BDOT….Its generally about how can we consume the services of UNIX under windows. Becoz both are different file system and architecture.

http://www.microsoft.com/windows/sfu
http://www.interopsystem.com

Again :), i met saravana MVP and came to my room with his Car…

Mahesh

Windows Services For Unix (SFU)- What’s in it for Developers ?
Time: 7:00 PM – 8:30 PM
Speaker: Gaurav Daga, Program Manager (SFU), Microsoft
Gaurav joined MS and the Windows Services for UNIX (SFU) team as a college hire and has worked across various feature teams through multiple releases of the product starting from SFU 3.0.
Venue: ThoughtWorks India [NOTE: Change in Venue]
5th Floor, Diamond District Building, Airport Road, Bangalore.
(Near Domlur flyover construction & oppo TGIF restaurant)

January 8, 2005 Posted by | Uncategorized | Leave a comment

Stored Procedures -drawbacks

 Stored Proc’s – not standard:

 The biggest drawback to Stored Procedures is that it is not currently in the ANSI SQL standard. This results in each DBMS vendor supporting a different flavor of Stored Procedures. Microsoft (and Sybase) Transact-SQL, Oracle PL/SQL, and Informix SPL, though similar, are distinct languages and not interoperable with one another. If your shop has standardized on one particular DBMS or does not need to scale applications across multiple platforms, then this may not be a problem. But, then again, how many shops does this actually describe? Not many, I’d venture to guess!

The bottom line is that scalability will suffer when applications are coded using non-standard extensions — like SQL Stored Procedures. It is a non-trivial task to re-code applications that were designed to use stored procedures and triggers written using SQL Stored Procedures constructs. If an application needs to be scaled to a platform which utilizes a DBMS that does not support SQL Stored Procedures, then exhaustive re-coding is exactly what must be done. Consider, for example, the steps necessary to move a SQL Server application, written in Transact-SQL using triggers and stored procedures, to a DB2 subsystem on a mainframe. Stored procedures must be converted from Transact-SQL into a host language such as COBOL or C. Triggers must be coded into the application programs supporting the DB2 database because DB2 does not yet support triggers. This process is a nightmare that will cause any DBA to get a headache just thinking about it.

b) Performance Degradation:

 An additional potential drawback comes in the form of the potential for performance degradation. Consider, for example, a SQL Server stored procedure. The first time this procedure is executed it is optimized.

 The optimized form of the procedure is stored in the procedure cache and will be re-executed for subsequent users. However, the procedure was optimized for the particular data request that was issued for the first execution. It is very likely that future executions of the procedure are for different amounts and types of data. If the logic were instead embedded into an application program and compiled statically, the performance would be optimized for all ranges of local variables. Of course, SQL Server provides an option to always optimize (with the recompile option), but then dynamic SQL is always used — which can cause different types of performance problems.

The solution would be to provide a form of static SQL for stored procedures that is not optimized for a particular type of request — but, of course, this option is not currently available.

Other performance drawbacks can be realized when using SQL Stored Procedures if the developer is not careful. For example, careless cursor coding can cause severe performance problems. But, this can happen just as easily when cursors are used inside a host language. The problem is more inherent to application design than it is to SQL Stored Procedures.

 c) Incomplete Functionality:

The final drawback is that even SQL Stored Procedures dialects are not computationally complete. Most dialects of SQL Stored Procedures lack programming constructs to control the user’s screen and mechanisms for data input/output (other than to relational tables).

 
MAhesh, SIS India, 9.38 AM

 

January 6, 2005 Posted by | Computers and Internet | Leave a comment

   

%d bloggers like this: