shopping

Home - Profile - Archives - Friends

properties of the connection

Posted on 9/29/2011 at 2:23 AM - Link

properties of the connection

The ADO.Net Connection ObjectThe ADO.Net Connection ObjectChris KempEither in connected or disconnected mode, the first thing one needs to do is to connect to the database(s). This is accomplished in ADO.net by creating a connection object that points to the subject database. The properties of the connection object are: Connection string A string used to connect to the database.Connection Timeout The number of seconds till a connection times out (Read Only)Database Returns the database name as specified in connection string (Read Only)DataSource Returns the source attribute as specified in connection string (Read Only)ServerVersion Returns version of connected server.State Returns state of current database in integers.

Values can be Closed, Connecting, Open, Executing, Fetching, BrokenProvider Returns the value of provider attribute as specified in connection string (Read Only) (OleDb Only)PacketSize Returns size in bytes of network packets (SQL Server only)WorkstationIDIdentifies client, as specified in connection string (Read Only)In the above table, the only property that is NOT read only is the connection string. Some folks say that it is the connection string that is the most difficult aspect of ADO and ADO.Net. If so, it is an easily learned one. A typical connection string consists of 4 items:The Provider, which specifies the name of the underlying OLEDB provider. Appropriate values are SQLOLEDB (for SQLServer), Microsoft.Jet.OLEDB.4.0 (for Microsoft Access) and MSDORA (for Oracle);The Data Source attribute, which shows the location of the database.

It can be a path on a network, or the IP address of a machine on the net;The UserID and Password, which grant access permission to the database;The Initial Catalog, which specifies the name of the database in the data source.Here are some common configurations:For SQL Server – Data Source=Jupiter;Initial Catalog=pubs;User Id=ElmerFudd;Password=wabbitt;Server=Jupiter;Database=pubs;Trusted_Connection=True;Connection Timeout = 10Data Source=200.192.23.155;Network Library=Wiley3301;Initial Catalog=pubs;User ID=ElmerFudd;Password=wabbitt;C#: using System.Data.SqlClient; objqlConnection oSQLConn = new SqlConnection();oSQLConn.ConnectionString=connectstring;;oSQLConn.Open(); obj VB.NET:Imports System.Data.SqlClientDim objSQLConn As SqlConnection = New SqlConnection()objSQLConn.ConnectionString="connectstring"objSQLConn.Open() For Oracle: Provider=OraOLEDB.Oracle;Data Source=mydatabase;User Id=ElmerFudd;Password=wabbitt;Provider=OraOLEDB.Oracle;Data Source= mydatabase;OSAuthent=1; C#: using System.Data.OracleClient;OracleConnection objOracleConn = new OracleConnection();objOracleConn.ConnectionString = my connectionstring;objOracleConn.Open(); VB.NET: Imports System.Data.OracleClientDim objOracleConn As OracleConnection = New OracleConnection()objOracleConn.ConnectionString = myconnectionstringobjOracleConn.Open() For MS Access: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=pathnamebiblio.mdb;User Id=ElmerFudd;Password=wabbitt; Notice that the last instruction in the code using the method ‘open()’. After the connection has been made, and the data retrieved, you need to close the connection using the connection method ‘close()’.

This should be done within an ‘if’ statement which first checks whether the connection is, in fact, open:If (objConnection.state and ConnectionState.Open) 0 Then objConnection.Close End If Note that the state property is ‘0’ if the connection is already closed. Testing for a closed connection is necessary to prevent an error when you are invoking the ‘close’ method.The connection objects methods are: OpenOpens connectionCloseCloses connectionBeginTransactionBegins database transactionChangeDatabaseChanges the name of database connected toCreateCommandCreates a command objectGetOleDbSchemaTableReturns schema tables and associated restricted columnsReleaseObjectPoolShared method which allows closing of connection pool when last connection is closed Exception Handling All ADO connection procedures should be protected with a Try/Catch Block. When dealing with a connection to another server, this is especially important to let your users know that it was the connection that failed, rather than the application code. TryconnSQLNorthwind.ConnectionString = _"Server=Jupiter;Database=pubs;Trusted_Connection=True;Connection Timeout = 10" Catch ExSQL As System.Data.SqlClient.SqlExceptionDim strErrorMsg As StringDim strerror As System.Data.SqlClient.SqlErrorFor Each strerror In ExSQL.ErrorsSelect Case strerror.NumberCase 17strErrorMsg = "Missing server"Case 4060strErrorMsg = "Missing database"Case 18456strErrorMsg = "Missing user name or password"Case ElsestrErrorMsg = strerror.MessageEnd SelectMessageBox.Show(sErrorMsg, "SQL Server Error: " & strerror.

Number, MessageBoxButtons.OK MessageBoxIcon.Error)NextCatch ExcpInvOp As System.InvalidOperationExceptionMessageBox.Show("Close the connection first!", _"Invalid Operation MessageBoxButtons.OK, MessageBoxIcon.Error)Catch Excp As System.Exception ' generic exception handlerMessageBox.Show(Excp.Message, "Unexpected Exception MessageBoxButtons.OK, MessageBoxIcon.Error)End Try Resources •Information on ADO.Net CourseThis resource provides information on ADO.Net course •Article on Microsoft .NETThis is a useful resource that discusses .Net technology in detail.Chris Kemp is a well knoen author who writes best quality articles on IT, Software, Programming, etc. For further details please visit the site http://www.ceeol.cn/blog/u/15298/index.html


Customer Service When Purchasing Process

Posted on 9/29/2011 at 2:18 AM - Link

Customer Service When Purchasing Process

The Importance of Customer Service When Purchasing Process Manufacturing SoftwareThe Importance of Customer Service When Purchasing Process Manufacturing SoftwareKingston AmadanProcess manufacturing software is the lifeblood of the chemical and food production industries. Products from paint to peanut butter are manufactured using some level of process manufacturing software applications, and for good reason. Process manufacturing software can make the almost impossible task of keeping track of formula characteristics such as the substances used, the units of measure for each substance and formula instructions, as easy as data entry will allow. Considering the large number of products and subsequent calculations most process manufacturers deal with on a daily basis, this is no small feat.Of course, as with any software, there are differences between even the most widely used software applications.

These differences are designed to set one company's process manufacturing software apart from the competition's software. Some features can prove to be very useful in certain circumstances, while others are cosmetic at best. Unfortunately, many process manufacturers use these differences as the sole factor in deciding on a software distributor. They often overlook customer service.Customer service is one of the most, if not the most, important facets of purchasing process manufacturing software. Not only will the level of customer service a business receives affect the implementation time frame, it can also have an effect on the level of functionality achievable with the software. Process Manufacturing software can be highly complicated, and requires training not only to maintain but also to properly utilize. In order to get the full benefit of all available features, personnel must be fluent in the organization and integration of the software as it pertains to their overall business structure.

They must also be able to navigate through the various interfaces with a full understanding of the data fields that are displayed. The software distributor should be the entity to provide the level of training necessary to successfully utilize the software they sell. Distributors who offer superior customer service will encourage active participation for an organization's key personnel at all levels of the software implementation, from analysis to deployment. Purchasing process manufacturing software is quite an endeavor, and all pertinent criteria should be considered. While the differences in the software itself may or may not be a factor in the level of satisfaction a business receives from it's purchase, the level of customer service the business encounters most certainly will be.To learn more about Process Manufacturing Software or to purchase visit http:http://www.cnfblog.com/blogs.php?blog_id=1147


technical issues while creating PHP

Posted on 9/28/2011 at 7:53 PM - Link

technical issues while creating PHP

How to create search engine friendly PHP pages without technical hiccupsPHPVincent VictorPHP is a powerful server side language that offers greater scalability, dynamism and ease of use than static HTML pages. However, PHP can be a hard nut to crack when it comes to search engine optimization. PHP developers encounter a lot of technical issues while creating PHP scripts based on SEO guidelines. Here are some issues that may affect optimization of PHP pages. Also given are guidelines on how to overcome them without technical hiccups:Latency of PHP scripts: The execution time of a PHP code counts a lot in determining the SEO friendliness of the script. If a search engine spider crawls your PHP page and follows a link, but is forced to wait long for the server to execute the PHP code behind the page, then, it may neglect your page or move on without crawling the rest the page.

To optimize the loop code and avoid slowdowns, reduce the number of SELECT * calls you use. Using SELECT on a table that contains 10 fields when you want to select only one is like inviting a slowdown of your script. Instead, name all the columns you want to retrieve. If you are using MySQL, test your queries using EXPLAIN statement. Further, to make loops more search engine friendly, use duplicated code that will not be repeated many times and static values such as count values. Session ID issue: If the "enable-trans-sid" option is turned on, it creates links with session ID numbers. Not only do your links grow nonsensically-lengthy, but they also present spiders with different URLs to the same content, which in turn may cause problems in the indexing of pages. To avoid session ID in your URLs, you need to disable the 'trans-id' feature in php.ini by setting "session.use_trans_sid" to false.

Else, you can disable session ID feature by adding php_flag session.use_trans_sid off to the .htaccess file in the root directory. Search Engine friendly URLs: To optimize your PHP pages to look like static pages to search engines, you can use either of the two ways - you can use Apache to fake such static page-like URLs or keep your GET variables to a minimum. URL cleanliness is a crucial issue in dynamic PHP pages. Since such pages are created with GET variables, the URLs look clumsy and almost unreadable to search spiders. Use less number of GET variables to avoid URLs like "Page.php?var=abc&var1=def&var2=ghi" Instead, you can also make GET variables relevant by using keyword rich titles and terms.

If the page requires more variables, you can combine the variables by delimiting them with a hyphen or an unused character and then, splitting them in the target page. Mod_rewrite: Rewriting your URLs should be done after a lot of thinking since you cannot be changing your links over and over again. First decide on how you want to rewrite your URLs, then go ahead and implement it in your .htaccess file. For instance, a sample mod_rewrite rule would be like this RewriteEngine OnRewriteRule ^(.*)/(.*)/(.*).html /index.php?act=$1&id=$2&page=$3 The first line starts the mod_rewrite engine, while the second line does the URL modification work. The second line dictates how to modify your actual URL like the one mentioned in part 2 of the RewriteRule. Author Bio:Dot Com Infoway is one of the leading IT company specializing in [ PHP web developement ] http://www.netchronos.com/blogs/posts/yyycqg


Empr�stimos - Seguros - Web Design - Cirurgia - Namoro

- Info Tudo

- Anuncios Gratis

- Guia Fenix

- Sexualidade - Dicas Viagens