Saturday, September 17, 2011

Enable CD/DVD Drive


Enable CD/DVD Drive


Refresh the CD and DVD drivers list in the Windows registry.

Disclaimer: The registry contains system-related information that is critical to your computer and applications. Before modifying the registry, be sure to make a backup copy of it. Adobe doesn't provide support for problems that arise from improperly modifying the registry. Adobe strongly recommends that you have experience editing system files before you modify the registry. For information on the Windows Registry Editor, see the Windows documentation or contact Microsoft Technical Support.

To refresh the CD and DVD drivers list in the Windows registry:

Important: After you refresh the driver list in the Windows registry, you may need to reinstall any other CD or DVD burning applications on your computer. If you restart Windows after this procedure and other CD or DVD burning applications do not recognize the CD or DVD drive, then reinstall those applications.

1.Uninstall your Adobe application.
2.Open Registry Editor:

◦On Windows 2000 and XP: Choose Start > Run. Type regedit in the Open text box and click OK.
◦On Windows Vista: Choose Start. Type regedit in the Search text box, and press Enter.
3.In the left pane of Registry Editor, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class and select the {4D36E965-E325-11CE-BFC1-08002BE10318} key, which appears as a folder.
4.Select File > Export (Windows XP and Vista) or Registry > Export Registry File (Windows 2000).
5.In the Export Registry File dialog box, select Selected Branch under Export Range, name the file (for example, CDDVDkey.reg), and click Save to save the file to the Desktop.
6.In the right panel of the Registry Editor, select the LowerFilters line, and then choose Edit > Delete. Click Yes in the Confirm Key Delete dialog box.
7.Select the UpperFilters line, and then choose Edit > Delete. Click Yes in the Confirm Key Delete dialog box.
8.Close Registry Editor.
9.Open Device Manager:

◦On Windows 2000 and XP: Choose Start > Control Panel. Double-click the System icon, click on the Hardware Tab, then click on Device Manager.
◦On Windows Vista: Choose Start > Control Panel, double-click System, then click Device Manager in the Tasks pane.
10.Click on the plus symbol next to DVD/CD-ROM Drives.
11.For each DVD-ROM or CD-ROM drive listed, select the icon then choose Action > Uninstall.
12.Restart Windows.
13.Windows will automatically detect and reinstall your DVD-ROM or CD-ROM drives. You can verify that the drives are installed by viewing them in Device Manager (see step 9). If the drives are not present, open Device Manger and choose Actions > Scan For Hardware Changes.
14.Reinstall your Adobe application.
15.Restart Windows.
Important: If this solution doesn't resolve the problem with the application you reinstalled, then you should restore the CD and DVD drivers list in the Windows registry.

To restore the exported CD and DVD drivers list:

1.Double-click the registry key you exported.
2.Close the Registry Editor.
3.Restart Windows.

Monday, July 25, 2011

SQL MULTIPLE TABLE QUERY WITH CONDITION

SQL MULTIPLE TABLE QUERY WITH CONDITION


If Not Page.IsPostBack Then
Dim conn As New SqlConnection("Data Source=\\10.182.186.100\pipe\sql\query;Initial Catalog=pay-roll;")
Dim adp As New SqlDataAdapter("select DEPT_NAME from DEPTT" , conn)
Dim dset As New Data.DataSet
adp.Fill(dset, "DEPTT")
datagrid1.datasource=dset
datagrid1.databind()
Dropdownlist1.DataSource = dset
Dropdownlist1.DataTextField = "DEPT_NAME"
Dropdownlist1.DataValueField = "DEPT_NAME"
Dropdownlist1.DataBind()
End If

End Sub
Sub DropDownList1_SelectedIndexChanged(sender As Object, e As System.EventArgs)
Dim conn As New SqlConnection("Data Source=\\10.182.186.100\pipe\sql\query;Initial Catalog=pay-roll;")
Dim adp1 As New SqlDataAdapter("select SECT_NAME from sectmast where ( dept_code = (select dept_code from deptt where

dept_name=" & "'" & Dropdownlist1.TEXT & "'" & "))" , conn)
Dim dset1 As New Data.DataSet
adp1.Fill(dset1, "sectmast")
Dropdownlist2.DataSource = dset1
Dropdownlist2.DataTextField = "SECT_NAME"
Dropdownlist2.DataValueField = "SECT_NAME"
Dropdownlist2.DataBind()


End Sub

Sub DropDownList3_SelectedIndexChanged(sender As Object, e As System.EventArgs)
Dim conn As New SqlConnection("Data Source=\\10.182.186.100\pipe\sql\query;Initial Catalog=pay-roll;")
Dim adp2 As New SqlDataAdapter("SELECT innder.EMP_CODE, innder.F_NAME, innder.L_NAME, DESGNMAS.DESGN_DTL,innder.PBASIC,

innder.SALARY_HD FROM EMPMAST innder INNER JOIN DESGNMAS ON innder.DESGN_CD = DESGNMAS.DESGN_CD where ( dept_code IN (select

dept_code from deptt where dept_name=" & "'" & Dropdownlist1.TEXT & "'" & ") AND SECT_CODE IN (select SECT_CODE from

sectmast where sect_name=" & "'" & Dropdownlist2.TEXT & "'" & ")) AND salary_hd=" & "'" & Dropdownlist3.TEXT & "'", conn)
Dim dset2 As New Data.DataSet
adp2.Fill(dset2, "innder")
datagrid1.datasource=dset2
datagrid1.databind()

End Sub
" HERE IN MULTIPLE QUERY WE HAVE TO USE ALIAS NAME OF OUR FIRST TABLE AS WE HAVE TAKEN "indder" in place of our table "EMPMAST" in query as well as we use "IN" in place of '=' condition and we have to use "INNER JOIN" in place of From EMPMAST, DESGNMAS as well as to link between both table we have to use :
ON innder.Desgn_cd=Desgnmas.Desgn_cd but If we want to unite two table result in one DATASET then we may use this like:
Select EMP_CODE FROM EMPMAST UNION SELECT DESGN_CD FROM DESGNMAS...

IN BODY :


OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" AutoPostBack="true">

DEPARTMENT

       

Width="104px">
   


SECTION

       

Width="104px">
   

OnSelectedIndexChanged="DropDownList3_SelectedIndexChanged" AutoPostBack="true">

N
P


       
       

Saturday, July 23, 2011

DropDownList1_SelectedIndexChanged AND SQL SUB QUERY


DropDownList1_SelectedIndexChanged AND SQL SUB QUERY

Let Suppose you need to refine Dropdownlist2 contents according to list item of Dropdownlist1 which are connected with data base then first you have to use :

OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" AutoPostBack="true">

autopostback should true and on indexchanged event you have to fire :
Sub DropDownList1_SelectedIndexChanged(sender As Object, e As System.EventArgs)
Dim conn As New SqlConnection("Data Source=\\10.182.186.100\pipe\sql\query;Initial Catalog=pay-roll;")
Dim adp1 As New SqlDataAdapter("select SECT_NAME from sectmast where ( dept_code = (select dept_code from deptt where

dept_name=" & "'" & Dropdownlist1.TEXT & "'" & "))" , conn)
Dim dset1 As New Data.DataSet
adp1.Fill(dset1, "sectmast")
Dropdownlist2.DataSource = dset1
Dropdownlist2.DataTextField = "SECT_NAME"
Dropdownlist2.DataValueField = "SECT_NAME"
Dropdownlist2.DataBind()


End Sub

where at load event already you have loaded dropdownlist1 with data like :

If Not Page.IsPostBack Then
Dim conn As New SqlConnection("Data Source=\\10.182.186.100\pipe\sql\query;Initial Catalog=pay-roll;")
Dim adp As New SqlDataAdapter("select DEPT_NAME from DEPTT" , conn)
Dim dset As New Data.DataSet
adp.Fill(dset, "DEPTT")
datagrid1.datasource=dset
datagrid1.databind()
Dropdownlist1.DataSource = dset
Dropdownlist1.DataTextField = "DEPT_NAME"
Dropdownlist1.DataValueField = "DEPT_NAME"
Dropdownlist1.DataBind()
End If

End Sub

and your header should be :
<%@ Page Language="VB" %>
<%@ import Namespace="System.Data.Sqlclient" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>

dropdownlist should be like :

OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" AutoPostBack="true">

MEMO_NO

but here since you are initiating your dropdownlist at run tine loading with datatable then here listitem should not be added.

Friday, July 22, 2011

SQL DATABASE CONNECTION IN ASP.NET


SQL DATABASE CONNECTION IN ASP.NET


<%@ Page Language="VB" %>
<%@ import Namespace="System.Data.Sqlclient" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>


Sub Page_Load

If Not Page.IsPostBack Then
Dim conn As New SqlConnection("Data Source=\\10.182.186.100\pipe\sql\query;Initial Catalog=pay-roll;")
Dim adp As New SqlDataAdapter("select * from ALLCDMAS", conn)
Dim dset As New Data.DataSet
adp.Fill(dset, "ALLCDMAS")
datagrid1.datasource=dset
datagrid1.databind()
End If

End Sub






BEFORE DOING THIS, YOU MUST HAVE TO GRANT ACCESSING PERMISSION FOR ASP.NET CLIENT USER TO YOUR SQL SERVER USING SQL SERVER > ENTERPRISE MANAGER > CONSOLE ROOT > MICROSOFT SERVER > SERVER GROUP > LOCAL SERVER > SECURITY > LOGINS > RITGH CLICK AND SELECT NEW LOGIN OPTION THEN > CLICK ... BUTTON AT NAME TEXTBOX > THEN SELECT ASP.NET USER TYPE > ADD > OK > THEN SPECIFY DEFAULT DATA BASE TO YOUR DATABASE NAME THEN ASSIGN SERVER ROLE > SYSTEM ADMIN > DATABASE ACCESS > CHECK YOUR DATABASE NAME THEN OK. NOW ENABLE NAMED PIPE FOR YOUR SERVER REMOTE ACCESS AS \\YOUR SERVER IP\pipe\sql\query , NOW GO TO YOUR CODE PAGE AND INSERT AS BELOW :

let suppose our server is 10.182.186.100 and database is pay-roll and i need ALLCDMAS table accessing then i have to insert like this _________


<%@ Page Language="VB" %>
<%@ import Namespace="System.Data.Sqlclient" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>

Sub Page_Load

If Not Page.IsPostBack Then
Dim conn As New SqlConnection("Data Source=\\10.182.186.100\pipe\sql\query;Initial Catalog=pay-roll;")
Dim adp As New SqlDataAdapter("select * from ALLCDMAS", conn)
Dim dset As New Data.DataSet
adp.Fill(dset, "ALLCDMAS")
datagrid1.datasource=dset
datagrid1.databind()
End If


Thursday, July 21, 2011

Different Connecting Strings for ASP.Net


Different Connecting Strings for ASP.Net

Standard security
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False;

with DSN:
ODBC DSNType: ODBC Driver
Usage: DSN=myDSN or FILEDSN=c:\myDsnFile.dsnManufacturer: Microsoft
More info about this driver »Customize string
example values »System DSN
DSN=myDsn;Uid=myUsername;Pwd=; File DSN
FILEDSN=c:\myDsnFile.dsn;Uid=myUsername;Pwd=; .NET Framework Data Provider for ODBCType: .NET Framework Wrapper Class Library
Usage: System.Data.Odbc.OdbcConnectionManufacturer: Microsoft
More info about this wrapper class library »Customize string
example values »Bridging to ODBC DSN
This is just one connection string sample for the wrapping OdbcConnection class that calls the underlying ODBC Driver. See respective ODBC driver for more connection strings to use with this class.DSN=myDsn;Uid=myUsername;Pwd=;

Connectingstring="DSN="mydsnname"

With database password
This is the connection string to use when you have an Access 2007 database protected with a password using the "Set Database Password" function in Access.Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Jet OLEDB:Database Password=MyDbPassword;Some reports of problems with password longer than 14 characters. Also that some characters might cause trouble. If you are having problems, try change password to a short one with normal characters. DataDirectory functionality
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\myAccess2007file.accdb;Persist Security Info=False; .NET Framework Data Provider for OLE DBType: .NET Framework Wrapper Class Library
Usage: System.Data.OleDb.OleDbConnectionManufacturer: Microsoft
More info about this wrapper class library »Customize string example values »Bridging to ACE OLEDB 12.0
This is just one connection string sample for the wrapping OleDbConnection class that calls the underlying OLEDB provider. See respective OLE DB provider for more connection strings to use with this class.Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False; Microsoft Access accdb ODBC DriverType: ODBC Driver
Usage: Driver={Microsoft Access Driver (*.mdb, *.accdb}Manufacturer: Microsoft
Customize string example values »Standard Security
Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=C:\mydatabase.accdb;Uid=Admin;Pwd=; Workgroup
Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=C:\mydatabase.accdb;SystemDB=C:\mydatabase.mdw;No changes were made to the .mdw file format for Office Access 2007. The Office Access 2007 Workgroup Manager creates .mdw files that are identical to those that are created in Access 2000 through Access 2003. The .mdw files that are created in those earlier versions can be used by databases in Office Access 2007.

ASP.Net on XP XML error solution


ASP.Net on XP XML error solution

You get this error when running your application:

The XML page cannot be displayed.

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

A name was started with an invalid character. Error processing resource 'http://localhost/MyApp1/...

<%@ Register Tagprefix="MyApp1" TagName="Header" Src="../Header & Footer/Header.ascx" %>

This error occurs when your Microsoft .NET Framework is not properly installed, not properly configured or not registered with the Microsoft IIS web server.
Just go to command prompt then type :
" c:\windows\Microsoft.net\framework\v2.0.50727\aspnet_regiis.exe i "
after this if you had installed asp.net 2.0.50727 in form of .net framework 2.0.50727 from internet into your computer then this will initialised .net framework to run asp.net page on your XP web server.

Tuesday, January 18, 2011

ASP.NET VS SQL SERVER CONNECTING STRING

ASP.NET VS SQL SERVER CONNECTING STRING



How To Describe Connection to SQL Server
We will use the System.Data.SqlClient and the System.Data namespaces of ADO.NET. The System.Data contains basic enumerations and classes, which we will use below. The System.Data.SqlClient provides data access to SQL servers such as MS SQL Server 2000 and higher. Add the next snippet to the beginning of your code page in order to get easy access to their classes:

using System.Data;
using System.Data.SqlClient;

To begin "communications" with our server we should define the SqlConnection class, initialize a new instance and set its connection string parameters. There is an example of a connection string below:

string Connection = "server=ALDAN; uid=sa; pwd=sa; database=GAZCAD; Connect Timeout=10000";

Let's understand what each parameter means:

Keyword Description
server > The address of a SQL Server. If the server is on a same computer, where your website runs, define it as "local". If the server is remote, define it as an IP รข€“ address, a domain name or a netbios name (as in the example string) of the server.
Uid> The login name, which is defined at your SQL Server to get access. Our login name is "sa".
Pwd >The password, which is defined at your SQL Server to get access. Our password is "sa".
Database >The database's name, which you connect to. Our database name is "GAZCAD".
Connect timeout> The time in milliseconds. When this time is over and the connection is not established, the timeout exception is thrown. This keyword is not necessary. In our case it equals 10,000 ms. Use so large timeouts when you request a lot of data from the server.