Hi, I want to pass the login information from aspx page to jsp page. Is it possible ? if yes , How? plz help me. Please reply asap. Thanks
anandss
Posts
-
Is it possible to pass the form contents of aspx page in .Net to Jsp page ? -
Use Time-Only in query (with parameters)SELECT * FROM mytable WHERE CONVERT(CHAR(8), mytime, 8) = CONVERT(CHAR(8), @TimeParam, 8)
-
which textbox is entered?The first argument to MouseEnter event "(object sender, EventArgs e)", sender is the control that triggered that event.
-
How to call another stored procedure within a sql server extended stored procedure?Use SqlContext
-
vb to C#.Netp = new CLAMXLib.ClamEngine();
-
Count of Rows ReturnedThis is the correct way. ExecuteNonQuery should be used for Insert/Update/Delete statements. If the CommandText is "SELECT" statment, then it will always return -1. When it is DML statement, then it will return the number of rows affected by that DML statement.
-
update in the same tableIf you want both rows, then use the following UPDATE table SET (col1, col2, col3,..., col20) = (SELECT col1, col2, col3,..., col20 FROM table WHERE ) WHERE ;
-
Stored Procedure in Oracle 8iHere is the corrected code. Obviously, I cannot check whether it is doing what it is supposed to do. I just corrected obvious syntax errors. One more thing, when you get "Warning: Procedure created with compilation errors." , it means there are some errors in the stored procedure and you need to correct it before start using it. CREATE OR REPLACE PROCEDURE usp_Security_IsAuthorisedUser ( strUserName IN VARCHAR2, strPassword IN VARCHAR2, blnIsValidUser OUT BOOLEAN, strInfo OUT VARCHAR2) AS intCount NUMBER; BEGIN intCount := 0; SELECT COUNT(*) INTO intCount FROM USERS WHERE UserID = strUserName AND Password = strPassword; --If count = 1 then only user information is correct IF intCount = 1 THEN BEGIN blnIsValidUser := TRUE; intCount := 0; strInfo := 'SP'; SELECT COUNT(*) INTO intCount FROM UnitRights WHERE HoU = strUserName; IF intCount = 1 THEN strInfo := 'UH'; --EXIT; Invalid. Should be used on in the loop RETURN; ELSE SELECT COUNT(*) INTO intCount FROM GENCODES WHERE FLD_NAME = 'MARKET_REG' AND UDF_ST3 = strUserName; --If count = 1 then this is Region Manager IF intCount = 1 THEN strInfo := 'RM'; --EXIT; Invalid. Should be used on in the loop RETURN; END IF; END IF; END; ELSE BEGIN blnIsValidUser := FALSE; SELECT COUNT(*) INTO intCount FROM USERS WHERE CODE = strUserName; IF intCount = 1 THEN strInfo := 'PI'; ELSE strInfo := 'UU'; END IF; END; END IF; END; regards
-
Passing parameter to OracleYou need to use, ODP.Net , Data Provider for Oracle supplied by Oracle. Assuming you have that here is the example from Oracle /********* Example Start *************/ using System; using System.Data; using System.Text; using System.Reflection; using Oracle.DataAccess.Client; using Oracle.DataAccess.Types; namespace ODPSample { class AssocArray { static void Main(string[] args) { Console.WriteLine("Demo: PL/SQL Associative Array"); // Connect string connectStr = "User Id=scott;Password=tiger;Data Source=oracle"; // Setup the Tables for sample Setup(connectStr); OracleConnection connection = new OracleConnection(connectStr); OracleCommand cmd = new OracleCommand("begin MyPack.TestVarchar2(:1, :2, :3);end;", connection); OracleParameter param1 = cmd.Parameters.Add("param1", OracleDbType.Varchar2); OracleParameter param2 = cmd.Parameters.Add("param2", OracleDbType.Varchar2); OracleParameter param3 = cmd.Parameters.Add("param3", OracleDbType.Varchar2); // Setup the direction param1.Direction = ParameterDirection.Input; param2.Direction = ParameterDirection.InputOutput; param3.Direction = ParameterDirection.Output; // Specify that we are binding PL/SQL Associative Array param1.CollectionType = OracleCollectionType.PLSQLAssociativeArray; param2.CollectionType = OracleCollectionType.PLSQLAssociativeArray; param3.CollectionType = OracleCollectionType.PLSQLAssociativeArray; param1.Value = new string[3]{"Input1", "Input2", "Input3"}; param2.Value = new string[3]{"Inout1", "Inout2", "Inout3"}; param3.Value = null; // Specify the maximum number of elements in the PL/SQL Associative // Array param1.Size = 3; param2.Size = 3; param3.Size = 3; // Setup the ArrayBind Size for param1 param1.ArrayBindSize = new int[3]{13,14,13}; // Setup the ArrayBind Status for param1 param1.ArrayBindStatus = new OracleParameterStatus[3]{ OracleParameterStatus.Success, OracleParameterStatus.Success, OracleParameterStatus.Success}; // Setup the ArrayBind Size for param2 param2.ArrayBindSize = new int[3]{20,20,20}; // Setup the ArrayBind Size for param3 param3.ArrayBindSize =