Help with SQLPLUS script timelapse



I need to make a particular query on an Oracle 10g DB via SQLPLUS.

I have a table structured this way:
NAME - VALUE1 - VALUE2 - DATE

This table is populated every day by a procedure that does a count on 2 other tables that should be identical (they are the master table and its snapshot on a daily Fast Refresh).
A line is written by the procedure in the first table with name of the counted table (NAME) value of first count (VALUE1) value of second count (VALUE2) and DATE.

I need to find a query that allows me to identify all those tables that have not been identical for the past 5/7 days. I can't do it by hand because everyday we have a refresh of over 20K tables.

So to be extra clear I'll do a couple of examples:

Case1:

TabA and SnapA have not been identical for the past 5 days
10 vs 9
12 vs 10
15 vs 14
23 vs 20
38 vs 29

in this case I need to see this table on the query.

Case2:
TabB and SnapB have not been identical for the past 5 days apart from day 2

10 vs 9
12 vs 12
15 vs 14
23 vs 20
38 vs 29

I don't need this data because I need to be sure that the table and the snapshot are not aligned for at least 5 consecutive days.

I hope my problem is clear . I'm not sure there is a way to solve it easily .

Any help well be GREATLY appreciated .

Phelit Leafwise
Posted On: Monday 31st of December 2012 01:53:21 AM Total Views:  282
View Complete with Replies

RELATED TOPICS OF Oracle PROGRAMMING LANGUAGE




Oracle version available

Could any one brief me as what oracle production version was available as on oct 2001 or atleast where can i find them with release dates.
VIEWS ON THIS POST

83

Posted on:

Friday 16th November 2012
View Replies!

Oracle to Sqlserver

I need to poll a sqlserver database using a select statement from an Oracle Unix instance to gather informtion from the Sqlserver table and to pull information of a certain type. I am aware of Oracle Heterogeneous services but since this is a Unix box it seems like I need to buy an expensive ODBC driver from an outside vendor to get this done. The other opinion are some Java ODBC drivers but it sounds like I then have to construct Java Sql instead of native Sql. Does anyone know a better way There are other architectural opinions but am I missing information on the ODBC front
VIEWS ON THIS POST

81

Posted on:

Friday 16th November 2012
View Replies!

Oracle to slow

I run a 2 instance Oracle9i R2(Dev and prod) on Win2K. When i execute sqlplus (prod)it take too long about 10mn and sometimes it didnt respond, but on prod db it's very quick. Prod and dev have the same configuration.
VIEWS ON THIS POST

54

Posted on:

Friday 16th November 2012
View Replies!

Migrate(change) firebird to MsSQL or Mysql server

I have firebird table View Procedure i want this is migrate on MS-Sql server or My sql . how to do it
VIEWS ON THIS POST

175

Posted on:

Tuesday 20th November 2012
View Replies!

assign variable in a sql - oracle

I have declared many variable in package's stored procedure. how can i assign many variables in a sql like belows: variable_1 varchar2(100); variable_2 varhcar2(100); select sum(col_a) into variable_1 , sum(col_b) into variable_b from table_A group by col_c,; or i need to assign value to 1 variable in a sql. if i have 2 variable. i need to write 2 sql\t any other methods
VIEWS ON THIS POST

204

Posted on:

Tuesday 20th November 2012
View Replies!

Pulling my hair out...What is left of it

Anyone have any ideas on this System.InvalidOperationException: SQL1159 Initialization error with DB2 .NET Data Provider, reason code 10, tokens 0.0.0, 9.7.6, Process Owner: IIS APPPOOL\ASP.NET v4.0 at IBM.Data.DB2.DB2ConnPool.Open(DB2Connection connection, String& szConnectionString, DB2ConnSettings& ppSettings, Object& ppConn) at IBM.Data.DB2.DB2Connection.Open() at _Default2.Page_Load(Object sender, EventArgs e) in D:\inetpub\wwwroot\aspnet\default2.aspx.vb:line 20
VIEWS ON THIS POST

268

Posted on:

Tuesday 20th November 2012
View Replies!

Please Correct Errors in my Update query

Hi Friends, I'm confusing here,please correct my errors and plz tell me how to write queries in this context...
VIEWS ON THIS POST

124

Posted on:

Tuesday 20th November 2012
View Replies!

ORA-01008: Not all variables bound

Thisisthecodebehindofmyfirstaspxpage: using System; using System.Collections; using System.Configuration; using System.Data; using System.Data.OracleClient; //using System.Data.OracleClient.OracleDataReader; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class RequesterDataInput : System.Web.UI.Page { Requests xxx = new Requests(); protected void Page_Load(object sender, EventArgs e) { ddlDepartment.DataSource = RequestDAL.GetDepartment(); ddlDepartment.DataTextField = "Description"; ddlDepartment.DataValueField = "Department_Code"; ddlDepartment.DataBind(); ddlDesignation.DataSource = RequestDAL.GetDesignations(); ddlDesignation.DataTextField = "Description"; ddlDesignation.DataValueField = "Designation_Code"; ddlDesignation.DataBind(); } protected void btnNext_Click(object sender, EventArgs e) { xxx.gTrans_Date = DateTime.Now; string constr = RequestDAL.GetConnectionString(); string query = "SELECT Room_ID, Room_No FROM Rooms WHERE Room_Status= 'O' AND Status= 'A'"; OracleConnection conn = new OracleConnection(constr); OracleCommand command = new OracleCommand(query, conn); conn.Open(); OracleDataReader reader = command.ExecuteReader(); if (reader.Read()) { Response.Redirect("HouseRequest.aspx"); } else { Response.Redirect("HotelRequest.aspx"); } reader.Close(); conn.Close(); GlobalsX.reqData = xxx; } protected void txtEmail_TextChanged(object sender, EventArgs e) { xxx.gEmail = txtEmail.Text; } protected void txtEmpNo_TextChanged(object sender, EventArgs e) { xxx.gEmp_No = txtEmpNo.Text; } protected void txtLastName_TextChanged(object sender, EventArgs e) { xxx.gLast_Name = txtLastName.Text; } protected void txtFirstName_TextChanged(object sender, EventArgs e) { xxx.gFirst_Name = txtFirstName.Text; } protected void txtMiddleName_TextChanged(object sender, EventArgs e) { xxx.gMiddle_Name = txtMiddleName.Text; } protected void ddlDepartment_SelectedIndexChanged(object sender, EventArgs e) { xxx.gDepartment_Code = ddlDepartment.SelectedValue; } protected void ddlDesignation_SelectedIndexChanged(object sender, EventArgs e) { xxx.gJob_title = ddlDesignation.SelectedValue; } protected void ddlStafFlag_SelectedIndexChanged(object sender, EventArgs e) { xxx.gStaff_Flag = ddlStafFlag.SelectedValue; } } When the button Next is clicked it should take me to the next page with the following code behind: using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class HotelRequest : System.Web.UI.Page { Requests xxx = new Requests(); RequestDAL request = new RequestDAL(); protected void Page_Load(object sender, EventArgs e) { ddlBranch.DataSource = RequestDAL.GetHotels(); ddlBranch.DataTextField = "Branch_Code"; ddlBranch.DataValueField = "Branch_Code"; ddlBranch.DataBind(); ddlHotels.DataSource = RequestDAL.GetHotels(); ddlHotels.DataTextField = "Description"; ddlHotels.DataValueField = "Hotel_Code"; ddlHotels.DataBind(); xxx.gUserCode = User.Identity.Name.ToUpper(); xxx.gLastUpdated = DateTime.Now; xxx.gHouse_ID = ""; xxx.gFlat_No = ""; xxx.gRoom_ID = ""; xxx.gArr_Date = (DateTime)null; xxx.gArr_Time = (DateTime)null; xxx.gDep_Date = (DateTime)null; xxx.gDep_Time = (DateTime)null; xxx.gDSO_UserCode = ""; xxx.gHR_UserCode = ""; } protected void ddlHotels_SelectedIndexChanged(object sender, EventArgs e) { xxx.gHotel_Code = ddlHotels.SelectedValue; } protected void ddlBranch_SelectedIndexChanged(object sender, EventArgs e) { xxx.gBranch_Code = ddlBranch.SelectedValue; } protected void btnSave_Click(object sender, EventArgs e) { request.AddRequest(xxx); } } When the button Save is clicked the mothod AddRequest in the class below should be executed and data inserted into my Request table. Instead I ecounter the error ORA-01008: not all variables bound. Please can anyone help me out using System; using System.Data; using System.Data.OracleClient; using System.Configuration; //using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; //using System.Xml.Linq; //using ePerformDataSetTableAdapters; /// /// Summary description for PerformanceRankingsBLL /// [System.ComponentModel.DataObject] public class RequestDAL { public static string GetConnectionString() { //sets the connection string from your web config file "ConnString" is the name of your Connection String return System.Configuration.ConfigurationManager.ConnectionStrings["HouseMgtConnectionString"].ConnectionString; } public static DataTable GetHotels() { string constr = GetConnectionString(); string query = "SELECT a.Hotel_Code, a.Description, b.Branch_Code FROM Hotels a, Branch b WHERE a.Branch_Code= b.Branch_Code AND a.Status='A' AND b.Status='A'"; OracleDataAdapter da = new OracleDataAdapter(query, constr); DataTable table = new DataTable(); da.Fill(table); return table; } public void AddRequest(Requests c) { string constr = GetConnectionString(); string query = "INSERT INTO Request (Emp_No, Last_Name, Middle_Name, First_Name, E_Mail, Department_Code, Job_title, Trans_Date, Staff_Flag, Branch_Code, Hotel_Code, House_ID, Flat_No, Room_ID, Arr_Date, Arr_Time, Dep_Date, Dep_Time, Remarks, approval, Usercode, DSO_UserCode, HR_UserCode, LastUpdated) VALUES(:Emp_No, :Last_Name, :Middle_Name, :First_Name, :E_Mail, :Department_Code, :Job_title, :Trans_Date, :Staff_Flag, :Branch_Code, :House_ID, :Hotel_Code, :Flat_No, :Room_ID, :Arr_Date, :Arr_Time, :Dep_Date, :Dep_Time, :Remarks, :approval, :Usercode, :DSO_UserCode, :HR_UserCode, :LastUpdated)"; OracleConnection con = new OracleConnection(constr); OracleCommand com = new OracleCommand(query, con); com.Parameters.AddWithValue(":Emp_No", c.gEmp_No); com.Parameters.AddWithValue(":Last_Name", c.gLast_Name); com.Parameters.AddWithValue(":Middle_Name", c.gMiddle_Name); com.Parameters.AddWithValue(":First_Name", c.gFirst_Name); com.Parameters.AddWithValue(":E_Mail", c.gEmail); com.Parameters.AddWithValue(":Department_Code", c.gDepartment_Code); com.Parameters.AddWithValue(":Job_title", c.gJob_title); com.Parameters.AddWithValue(":Trans_Date", c.gTrans_Date); com.Parameters.AddWithValue(":Staff_Flag", c.gStaff_Flag); com.Parameters.AddWithValue(":Branch_Code", c.gBranch_Code); com.Parameters.AddWithValue(":Hotel_Code", c.gHotel_Code); com.Parameters.AddWithValue(":House_ID", c.gHouse_ID); com.Parameters.AddWithValue(":Flat_No", c.gFlat_No); com.Parameters.AddWithValue(":Room_ID", c.gRoom_ID); com.Parameters.AddWithValue(":Arr_Date", c.gArr_Date); com.Parameters.AddWithValue(":Arr_Time", c.gArr_Time); com.Parameters.AddWithValue(":Dep_Date", c.gDep_Date); com.Parameters.AddWithValue(":Dep_Time", c.gDep_Time); com.Parameters.AddWithValue(":Remarks", c.gRemarks); com.Parameters.AddWithValue(":approval", c.gapproval); com.Parameters.AddWithValue(":Usercode", c.gUserCode); com.Parameters.AddWithValue(":DSO_UserCode", c.gDSO_UserCode); com.Parameters.AddWithValue(":HR_UserCode", c.gHR_UserCode); com.Parameters.AddWithValue(":LastUpdated", c.gLastUpdated); con.Open(); com.ExecuteNonQuery(); con.Close(); } } public class Requests { public string gEmp_No { get; set; } public string gLast_Name { get; set; } public string gMiddle_Name { get; set; } public string gFirst_Name { get; set; } public string gEmail { get; set; } public string gDepartment_Code { get; set; } public string gJob_title { get; set; } public DateTime gTrans_Date { get; set; } public string gStaff_Flag { get; set; } public string gBranch_Code { get; set; } public string gHouse_ID { get; set; } public string gHotel_Code { get; set; } public string gFlat_No { get; set; } public string gRoom_ID { get; set; } public DateTime gArr_Date { get; set; } public DateTime gArr_Time { get; set; } public DateTime gDep_Date { get; set; } public DateTime gDep_Time { get; set; } public string gRemarks { get; set; } public string gapproval { get; set; } public string gUserCode { get; set; } public string gDSO_UserCode { get; set; } public string gHR_UserCode { get; set; } public DateTime gLastUpdated { get; set; } }
VIEWS ON THIS POST

142

Posted on:

Tuesday 20th November 2012
View Replies!

craete excel workbook with diffrent sheets and send it as attachment using memory stream

hi, We are sending auto email of different reports to our client everyday in PDF with seprate email for each report..... But Now client wants all report should come in one Excel workbook with diffrent sheets containing diffrent report ... we are using memorystream to send email.... how to craete excel workbook with diffrent sheets and send it as attachment using memory stream ......
VIEWS ON THIS POST

255

Posted on:

Tuesday 20th November 2012
View Replies!

cannot create stored procedure in mysql database

database : Mysql i was able to create stored procedure in localhost, once i started using live database ,, i am not able to create any procedures,. please help
VIEWS ON THIS POST

205

Posted on:

Tuesday 20th November 2012
View Replies!

ORA-06502: PL/SQL: numeric or value error: character string buffer too small

Hi In windows 2008 server (64 bit) application is deployed and database is oracle 10g. I got the error ORA-06502: PL/SQL: numeric or value error: character string buffer too small for one storeprocedure. The same database is dump in window 2003 server, the application is working.No error. Given solution for window 2008 server.
VIEWS ON THIS POST

383

Posted on:

Tuesday 20th November 2012
View Replies!

How to see Definitions of View

Hi Friends, \t I am using PL/SQL Developer. I have an view "MEDPRO_MULTIPLE_ID". Suppose If I want to see the columns inside the view. What Command Should I use. Can you please guide me.
VIEWS ON THIS POST

215

Posted on:

Tuesday 20th November 2012
View Replies!

Sybase Entity Framework Problem

Having trouble finding a solution to this so I'm going to throw it out to the forums. I've got a web application that is connecting to a Sybase SQL Anywhere 11 database using a system DSN. I've created a EDMX file so I can use the Entity Framework and LINQ to do my data operations. My problem is that everything works correctly on my local development machine when I run the web application via Cassini; however when I publish the application to the IIS server the thing blows up on me. The error I get is Server Error in '/' Application. Unable to find the requested .Net Framework Data Provider. It may not be installed. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed. Source Error: [Norelevantsourcelines] Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\319954c3\cfd08944\App_Web_lnmg8nri.0.cs \t Line: 0 Stack Trace: [ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.] System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +1310319 System.Data.EntityClient.EntityConnection.GetFactory(String providerString) +35 [ArgumentException: The specified store provider cannot be found in the configuration, or is not valid.] System.Data.EntityClient.EntityConnection.GetFactory(String providerString) +62 System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +394 System.Data.EntityClient.EntityConnection..ctor(String connectionString) +82 System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString) +42 System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName) +16 NGSP_Dummy2.NGSPConnection..ctor() in C:\Documents and Settings\brauens\My Documents\Visual Studio 2008\Projects\NGSP Dummy2\NGSP Dummy2\NGSP.Designer.cs:26 NGSP_Dummy2._Default..ctor() in C:\Documents and Settings\brauens\My Documents\Visual Studio 2008\Projects\NGSP Dummy2\NGSP Dummy2\Default.aspx.cs:12 ASP.default_aspx..ctor() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\319954c3\cfd08944\App_Web_lnmg8nri.0.cs:0 __ASP.FastObjectFactory_app_web_lnmg8nri.Create_ASP_default_aspx() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\319954c3\cfd08944\App_Web_lnmg8nri.1.cs:0 System.Web.Compilation.BuildResultCompiledType.CreateInstance() +32 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +119 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33 System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40 System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +160 System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155 Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082 I've added the client ODBC and OLEDB, etc. tools to the IIS Server but don't know if there is anything else I've missed.
VIEWS ON THIS POST

148

Posted on:

Tuesday 20th November 2012
View Replies!

Converting SQL Server Datetime to MySQL Datetime

I amtrying to store aSQL Server datetime into MySQLdatetime field, but MySQL stores thedate value as all zeros. I use this function to trim the fractional part from the SQL Server datetime, but get the same result when trying to store it inMySQL. DimtDateAsString=sqlDate.ToString() tDate=tDate.Substring(0,tDate.Length-4) ReturntDate
VIEWS ON THIS POST

82

Posted on:

Tuesday 20th November 2012
View Replies!

Calling AS400 Stored Procedure from ASP.net C# Coding

I have a reqinwhich I haveto call an AS400 storedprocedure.The storedhas an input and output parameter. Can any body help me.I am new to this technology. Please help me itsurgent
VIEWS ON THIS POST

119

Posted on:

Tuesday 20th November 2012
View Replies!

Getting Error saying System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.

Getting the following error when browsing .net 2.0 application System.Data.OracleClient requires Oracle client software version 8.1.7 or greater. I have setup a .net 2.0 application with oracle backend on windows server 2008 R2. I have oracle client 11g installed on the serverfor the application to talk to the oracle database. This worked well when the .net 2.0 application was hosted on windowsserver 2003 and oracle client 10g. But when it is hosted on server 2008 with new oracle client it is giving the above error when browsing the page. This error occurs when the connection is opened inside the c# code. Please help.
VIEWS ON THIS POST

125

Posted on:

Tuesday 20th November 2012
View Replies!

Importing from Excel

I gues; I nid ur assistant. Am develping an application that nid to upload from an excel file. Which i did and it works on development pc but on getting to to dedicated server after publishing i started getting error that path could not be located.Actually am uploading on to server an picking from the server.I nid to put it a folder called upload and picking from it not to server directly pls solve this along too on pick it from the folder below is the code that i used from developing pc pls i will appreciate if this can be solved. tHANK U THIS IS CODE protected void btnUpload_Click(object sender, EventArgs e) \t\t\t { \t\t\t\t\t string FileName = FileUpload1.PostedFile.FileName; \t\t\t\t\t string saveDir = @"/"; \t\t\t\t\t string appPath = Request.PhysicalApplicationPath; \t\t\t\t\t string savePath = appPath + saveDir + Server.HtmlEncode(FileUpload1.FileName); \t\t\t\t\t try \t\t\t\t\t { \t\t\t\t\t\t\t try \t\t\t\t\t\t\t { \t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t if (FileUpload1.HasFile) \t\t\t\t\t\t\t\t\t { \t\t\t\t\t\t\t\t\t\t\t if (CheckFilesType(FileUpload1.FileName)) \t\t\t\t\t\t\t\t\t\t\t { \t\t\t\t\t\t\t\t\t\t\t\t\t FileUpload1.SaveAs(savePath); \t\t\t\t\t\t\t\t\t\t\t\t\t string strFileNamea = Server.MapPath(FileName); \t\t\t\t\t\t\t\t\t\t\t\t\t string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strFileNamea + ";" + "Extended Properties='Excel 8.0;HDR=YES;'"; \t\t\t\t\t\t\t\t\t\t\t\t\t #region..................... \t\t\t\t\t\t\t\t\t\t\t\t\t //Create Connection to Excel work book \t\t\t\t\t\t\t\t\t\t\t\t\t OleDbConnection excelConnection = new OleDbConnection(excelConnectionString); \t\t\t\t\t\t\t\t\t\t\t\t\t //Create OleDbCommand to fetch data from Excel \t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t OleDbCommand cmd = new OleDbCommand("Select * from [Result$]", excelConnection); \t\t\t\t\t\t\t\t\t\t\t\t\t excelConnection.Open(); \t\t\t\t\t\t\t\t\t\t\t\t\t OleDbDataReader dReader; \t\t\t\t\t\t\t\t\t\t\t\t\t dReader = cmd.ExecuteReader(); \t\t\t\t\t\t\t\t\t\t\t\t\t SqlBulkCopy sqlBulk = new SqlBulkCopy(Controller.ConnectionString); \t\t\t\t\t\t\t\t\t\t\t\t\t sqlBulk.DestinationTableName = "tbl_StudentResult"; \t\t\t\t\t\t\t\t\t\t\t\t\t sqlBulk.ColumnMappings.Add("MatricNo", "MatricNo"); \t\t\t\t\t\t\t\t\t\t\t\t\t sqlBulk.ColumnMappings.Add("CA", "CA"); \t\t\t\t\t\t\t\t\t\t\t\t\t sqlBulk.ColumnMappings.Add("ExamScore", "ExamScore"); \t\t\t\t\t\t\t\t\t\t\t\t\t sqlBulk.WriteToServer(dReader); \t\t\t\t\t\t\t\t\t\t\t\t\t Utilities.PortalMessage = "Successfully uploaded"; \t\t\t\t\t\t\t\t\t\t\t\t\t UpdateTable(); \t\t\t\t\t\t\t\t\t\t\t\t\t Clear(); \t\t\t\t\t\t\t\t\t\t\t\t\t #endregion \t\t\t\t\t\t\t\t\t\t\t } \t\t\t\t\t\t\t\t\t } \t\t\t\t\t\t\t } \t\t\t\t\t\t\t catch \t\t\t\t\t\t\t { \t\t\t\t\t\t\t\t\t Utilities.PortalMessage = "The Files you are uploading have been previously uploaded. "; \t\t\t\t\t\t\t } \t\t\t\t\t } \t\t\t\t\t catch \t\t\t\t\t { \t\t\t\t\t\t\t Utilities.PortalMessage = "The Files is not supported.You can only upload .xls Files format."; \t\t\t\t\t } \t\t\t }
VIEWS ON THIS POST

72

Posted on:

Tuesday 20th November 2012
View Replies!

how to exec sproc with datetime

i have a sproc which pass in 2 datetime to process, my question is how can i exec it with script as i keep getting error " Error converting data type int to datetime." exec sproc_Generate 1032010 12:00:00 AM , 1032010 12:00:00 AM;
VIEWS ON THIS POST

140

Posted on:

Tuesday 20th November 2012
View Replies!

MySQL charset latin1 = ASP.NET charset ??

We're migrating a classic ASP application which is using a MySQL database to ASP.NET. MySQL tables were/are created with "TYPE=InnoDB CHARACTER SET latin1". The classic ASP application has no problem whatsoever with storing special characters like the Euro sign () or into the MySQL database.But I can't get ASP.NET to do the same. Things like the Euro sign get dropped and replaced by a I've tried experimenting with settings in my web.config file, like: \t \t \t \t \t \t But neither of those efforts give me the result I'm after. I've also tried experimenting with different DB drivers, so I tried ASP.NET Connector/NET and also ASP.NET Connector/ODBC (version 3.51 and 5.1). But that didn't make a difference either. What do I need to do to get ASP.NET to insert the special characters correctly into the MySQL database and retrieve them correctly again afterwards
VIEWS ON THIS POST

82

Posted on:

Tuesday 20th November 2012
View Replies!

MySql

...
VIEWS ON THIS POST

71

Posted on:

Tuesday 20th November 2012
View Replies!

Updating Visual Foxpro from ASP .NET

Has anyone managed to update a foxpro table from ASP.net. If so how is the UPDATECOMMAND structured because the following does not seem to work. UpdateCommand="UPDATE trips SET trips.pickup = @PICKUP WHERE trips.id = @ID">
VIEWS ON THIS POST

212

Posted on:

Tuesday 20th November 2012
View Replies!

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I am using the Microsoft.Data.Odbc .NETAddin to connect ODBCto IBM iseries DB2 I used the Odbc connection class OdbcConnection, command OdbcCommand and reader OdbcDataReader, just like with the SQL provider. I am creating a new sql command and executing readervia the same connection established. works fine 2 twise, by this i mean the entire operation, then again, then the third time I get: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." If I restart my service I get another two times, then it fails. So in the first two runs, many sql commands are created and executed and i save my data. Then all of a sudden, the third time it throws this. So it works to begin with I thought I may be pushing it with so many sql commands after one another, but i manage the objects i am using well\t\t\t\t\t please help someone its critical Dim conn As New OdbcConnection(myJob.myUser.DSNCONNSTR) Dim cmd As OdbcCommand Dim rdr As OdbcDataReader Try conn.Open() For Each obj As MyObject In myDataList cmd = conn.CreateCommand cmd.CommandType = CommandType.Text cmd.CommandText = getOLineSQL(obj) 'create my sql on the fly based on properties of obj rdr = cmd.ExecuteReader If rdr.Read Then While rdr.Read 'save my data somewhere End While End If rdr.Close() Next Catch ex As Exception rdr = Nothing conn.Close() conn.Dispose() End Try 'kill connection conn.Close() conn.Dispose() Many
VIEWS ON THIS POST

161

Posted on:

Tuesday 20th November 2012
View Replies!

MySQL 5.x, Stored Procedures and @@ERROR

I know in SQL Server Stored Procedures you can do something like this: IF (@@ERROR != 0) BEGIN \t\t RETURN -1 END ELSE BEGIN \t\t RETURN 0 END Does MySQL have something similar to the @@ERROR I haven't been able to find anything in the MySql Stored Procedures articles about using something like @@ERROR in a stored Procedure
VIEWS ON THIS POST

64

Posted on:

Tuesday 20th November 2012
View Replies!

function

how to separate date and char in one field ex. ( 08/15/87 CAHCM\t\t 09/15/1987CAHCM\t 08/21/87CA HCM\t) i'dlike to separate 08/15/1987 to CA HCM pls. help tnk's. \t
VIEWS ON THIS POST

91

Posted on:

Tuesday 20th November 2012
View Replies!

"expecting identifier or quoted identifier"

The following statement in a sqldatasource executes fine in the querybuilder and in Toad, but gives the above error when I try to test the query. The problem is the derived table; if I remove it, everything works fine. I need to use a derived table for some aggregation I'm doing. I haven't seen anyone on the web with the same problem, so I guess I'm doing something wrong
VIEWS ON THIS POST

333

Posted on:

Tuesday 20th November 2012
View Replies!

First time using MySql - Index out of range

Hi I am trying to connect to MySql Database, and fill a DataSet with serveral tables. (MySql v 5.0) Here's my code: Dim objDS As DataSet = New DataSet() Dim objConn As OleDbConnection = New OleDbConnection(ConfigurationManager.ConnectionStrings("conn").ConnectionString) Dim objCmd As OleDbCommand = New OleDbCommand objCmd.Connection = objConn objCmd.CommandType = CommandType.Text Try Dim objDA As OleDbDataAdapter = New OleDbDataAdapter(objCmd) objDA.SelectCommand = objCmd objCmd.CommandText = "SELECT aID AS itemID, aName AS itemName FROM PRD_A WHERE deleted = 0 ORDER BY sortOrder, areaName;" objDA.Fill(objDS,"level1") objCmd.CommandText = "SELECT tID AS itemID,tName AS itemName FROM PRD_T WHERE deleted = 0 ORDER BY sortOrder, typeName;" objDA.Fill(objDS,"level2") objCmd.CommandText = "SELECT sID AS itemID,sName AS itemName FROM PRD_S WHERE deleted = 0 ORDER BY sortOrder,seriesName;" objDA.Fill(objDS,"level3") objCmd.CommandText = "SELECT bID AS itemID,bName AS itemName FROM PRD_B ORDER BY sortOrder,brandName;" objDA.Fill(objDS,"level3") objCmd.CommandText = "SELECT pID As itemID,pName AS itemName FROM PRD_P ORDER BY sortOrder,powerType;" objDA.Fill(objDS,"level4") Return objDS Catch ex As Exception I getthe following error: System.IndexOutOfRangeException: Cannot find table 0. Kindly help. Thank you
VIEWS ON THIS POST

236

Posted on:

Wednesday 21st November 2012
View Replies!

reate a sq procedure

i want to create a sq procedure for a table called login in whic 2 fields are there user id and pwd i want to fetch the user id and pwd from login table using sql store procedure in text box asp.net, please help me with step by step code foe sql procedure and asp.net code with c#
VIEWS ON THIS POST

107

Posted on:

Wednesday 21st November 2012
View Replies!

How to make a oracle package call and receive the return values as dataset

Here is My Problem, I have a complicated login porcess, there are two seperate databases involve in it. Firstly, I will search the userid in the local sql server 2005 database, if not found I will call an oracle package which is being develop by a third party(none comercial) and that package will verify the userid and password and return meuser's present credentials (rolse, orgs, etc) as dataset. My question is how do a call that oracle package from asp.net application and how do a recieve a oracle dataset or cursor at the asp.net. Sorry if i wasnt clear. I really do need help on this, any help will be appreciated. I will like to use ODP.net if at all possible.
VIEWS ON THIS POST

218

Posted on:

Wednesday 21st November 2012
View Replies!

how can i setup a login status since i using MySQL???

i using MySQL,thus i cant use the logincontrol provide by Visual Studio 2005. i using master page as well.and now i wish to make a login status for my page.how can i do it anyone hav any idea\t
VIEWS ON THIS POST

146

Posted on:

Wednesday 21st November 2012
View Replies!

SQL question

I have this query: select * from... where \t firstName = "A" or firstName = "B" I need it to be like: where \t firstName = ("A" or "B") Does someone know how can I do that
VIEWS ON THIS POST

82

Posted on:

Wednesday 21st November 2012
View Replies!

NULL values!!

How to insert NULL values into a oracle table I have example below, its giving an error.. Oracle table ABC Table definition Col1 Number(2,0)null Col2 Number(5,2)null Vb.net code: Stored Procedure Parameters laParams(1) = New OracleParameter("i_one", OracleType.Number, 2, ParameterDirection.Input, False, 12, 0, "i_one", DataRowVersion.Current, txt_one.Text.Trim) laParams(2) = New OracleParameter("i_two", OracleType.Number, 5, ParameterDirection.Input, False, 12, 0, "i_two", DataRowVersion.Current, txt_two.Text.Trim) in Insert statement(Stored Procedure) I am passing like insert into ABC(Col1,Col2) values (NVL(i_one,''),NVL(i_two,'')) Failed to convert parameter value from a String to a Decimal. Even I tried like this.. insert into ABC(Col1,Col2) values (NVL(i_one,NULL),NVL(i_two,NULL)) Failed to convert parameter value from a String to a Decimal. How to avoid this error
VIEWS ON THIS POST

69

Posted on:

Wednesday 21st November 2012
View Replies!

Connection Pool using Odbc

HI, May i know how do i implement connection pool in mysql using odbc connector in asp.net. I set the pooling = "true" in the connection string parameter and when i check all the connection pool using mysql adminstrator, i dun see the connection created on my pool as i did set the maxconnection = 100. I am not pretty sure how connection pool is implemented. Hence please correct me if i am wrong and please give some suggestion or example on how to implement connection pool in .net. Many
VIEWS ON THIS POST

113

Posted on:

Wednesday 21st November 2012
View Replies!

stored procedure call returns no value

, I am trying to figure out why my stored procedure call does not write out results. I have a feeling that I am retrieving it wrong. I am using a MySQL database. The stored procedure create statement (just beginning). Does anyone have any good ideas
VIEWS ON THIS POST

199

Posted on:

Wednesday 21st November 2012
View Replies!

How can i create a database driven serch engine.

I have a hotel table.The table consits of the hotel table consits of the follwoing attributes: 1. HotelID,2.County Code, 3.Hotel Name , 4. Hotel Desc , Address ,Postal code , Hotel Location Help and ect ... How can i create in a way that when the user inputs a search query in the database, i am ablegive the the required hotels.Can anyone suggest a good way where i can make it like how the normal search engine works, for example if you look at google search, they have engine for images,web,news and ect......mine is similar but just that it is for hotel and the data is stored in the database. Than if the search fails or the persontype wrongly, i want to have suggestions for the users like: 1. Did you mean\t Hope that someone can suggest me a good way as i want to score for my project.Till than i am hoping to hear from someone who can share their knowledge to me and i will be really
VIEWS ON THIS POST

164

Posted on:

Wednesday 21st November 2012
View Replies!

Page dont respond

i developed a web page Asp.net 2.0 visual basic which had a form for adding records to an oracle database the page after several post backs dont load can any one help me what may be the cause of that do i have to free the memory please help
VIEWS ON THIS POST

125

Posted on:

Wednesday 21st November 2012
View Replies!

Oracle Connection error

I am using an OracleConnectionString set in my web.config. Everything works fine when I call it in declarative code. However, when I try to write custom code in the .cs file I get this error: Compiler Error Message: CS0246: The type or namespace name 'OracleConnection' could not be found (are you missing a using directive or an assembly reference) Source Error: Line18:\t\tprivatevoidButton1_Click(objectsender,System.EventArgse) Line19:\t\t{ Line20:\t\t\t\tusing(OracleConnectionconnection=newOracleConnection(connectionString)) Line21:\t\t\t\t{ Line22:\t\t\t\t\t\tOracleConnectionsqlCon; Here is the beginning of my .cs file. Do I need to call some special Oracle class If so why - doesn't the config file handle this
VIEWS ON THIS POST

231

Posted on:

Wednesday 21st November 2012
View Replies!

Visual Web Developer 2005 Express Edition connection to Informix

, I can connect to my Informix DB and view all my tables along with the table attributes using the .Net Framework Data Provider for ODBC. The problem I'm having is when I "click" on "Show Table Date" in the Data Base Explorer I get the following error. SQL Execution Error: Executed SQL Statement: SELECT lang_id, actn_id FROM system.informix.aactn Error Source: IVINF709.DLL Error Message: ERROR [42000][INTERSOLV][ODBC Informix driver][Informix]A syntax error occured. Can anyone help point me in the right direction.
VIEWS ON THIS POST

149

Posted on:

Wednesday 21st November 2012
View Replies!

strange oracle connectivity issue with vs 2005

, I have vs 2005 and oracel 10 g client installed on windows xp. I can create sqldatasources(oracle) just fine. I can browse the oracle database in the server explorerwindowjust fine. However, when i go run(locally with vs 2005 built in webserver) the app to debug it i get the following error "ORA-12154: TNS:could not resolve the connect identifier specified" Everything is using the same tns file name.\t
VIEWS ON THIS POST

216

Posted on:

Wednesday 21st November 2012
View Replies!

how can i set primary key with auto-increment

Once i export "tblCategory" more than once, so i had duplicates data, i had to add new colum and add sequin number, so i can delete duplicates. The problem is now after i did that, i can not insert new record anymore how to set primary key with auto-increment (SQL). i realy have data there, if i do that is that possible the old data ganna change so how can i set primary key with auto-increment with last record's number (example , last sequence number was "500")
VIEWS ON THIS POST

182

Posted on:

Wednesday 21st November 2012
View Replies!

ODP.NET:Windows Authentication is not working. Pls help.

I am working on VS.NET 2003 envt on a web application in C#.NET and trying to connect to Oracle 9i database. Because this appln is to be used in an intranet, hence OS authentication is to be used. The following connection string works fine for me and connects properly to the database; OracleConnection con = new OracleConnection(); con.ConnectionString = "User Id=temp_userID;Password=temp_pwd;Data Source = oracle_serverName;"; con.Open(); where 'user id' and 'password' are present in the 'sys_userinfo' table. Now when I connect to the oracle server thru SQL* PLUS, giving just "/" as the user-id (to indicate Windows authentication is to be considered) and appropriate server name, it properly connects to the database. Finally now I need to connect to the oracle server in following manner: OracleConnection con = new OracleConnection(); con.ConnectionString = "User Id=/;Data Source=oracle;"; con.Open(); Here it gives error saying "null password given, logon denied". I searched all over on Google here and there, tried all 3 data providers (ODP.NET, OleDb and ODBC), all the data providers connect to the database when the user-id and pwd is given, but none of them work for "user id=/", that is for OS authentication. I verified IIS config as well and it does has 'Integrated Windows Authentication' check box properly checked too. Nothing fancy, its simple attempt to connect to Oracle database thru Windows authentication, pls help! pls help!pls help!
VIEWS ON THIS POST

309

Posted on:

Wednesday 21st November 2012
View Replies!

can't connect to as400 using oledb

I get the error below when I try to connect to as400 using oledb. Any suggestions how i can fix this Non-NULL controlling IUnknown was specified, and either the requested interface was not IUnknown, or the provider does not support COM aggregation.
VIEWS ON THIS POST

127

Posted on:

Wednesday 21st November 2012
View Replies!

Connecting to Oracle

There, Can someone provide me with enough information to connect to Oracle DB, I have been using SQL Server in the past. Do i need to download Oracle Oledb Provider If yes, can you please provide me the link. Also, can you please give me the sample code of connection string.
VIEWS ON THIS POST

151

Posted on:

Wednesday 21st November 2012
View Replies!

The OracleParameter is already contained by another OracleParameterCollection.

I have the following class method: publicstaticOracleParameterCollectionRunProcedure(stringProcedureName,OracleParameterCollectionParams) { OracleConnectioncnnMain=GetConnection(); cnnMain.Open(); try { OracleCommandocProc=newOracleCommand(ProcedureName,cnnMain); ocProc.CommandType=CommandType.StoredProcedure; foreach(OracleParameterobjParaminParams) { ocProc.Parameters.Add(objParam); } ocProc.ExecuteNonQuery(); cnnMain.Close(); returnocProc.Parameters; } catch(Exceptione) { cnnMain.Close(); throwe; } } Called with: OracleParameterCollection objParams = new OracleParameterCollection(); objParams.Add("v_mas_name", OracleType.VarChar); objParams["v_mas_name"].Value = Item.MasonName; objParams["v_mas_name"].Direction = ParameterDirection.Input; objParams.Add("v_mas_id", OracleType.Number); objParams["v_mas_id"].Direction = ParameterDirection.Output; objParams = Functions.RunProcedure("proc_AddMason", objParams); return Int32.Parse(objParams["v_mas_id"].ToString()); Im getting the error "The OracleParameter with ParameterName 'v_mas_name' is already contained by another OracleParameterCollection." I'm a bit confused by this. For a start, why does it matter that v_mas_name is in another OracleParameterCollection Secondly, how does the system know that It's not like they are all held in a central place or anything.
VIEWS ON THIS POST

555

Posted on:

Wednesday 21st November 2012
View Replies!

Re: Crystal Reports using Oracle

i have been using oracle database for my program for development and everything (commands... connections...) works fine in my classes the problem is, when i try to create a crystal report using the wizard, the connection is valid and i can get the data to display on the rpt during development, but when i run it, the page returns me a error : Server Error in '/ium' Application. -------------------------------------------------------------------------------- Logon failed. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [LogOnException: Logon failed.] .F(String  , EngineExceptionErrorID  ) .A(Int16 , Int32 ) .@(Int16 ) CrystalDecisions.CrystalReports.Engine.FormatEngine.GetPage(PageRequestContext reqContext) CrystalDecisions.ReportSource.LocalReportSourceBase.GetPage(PageRequestContext pageReqContext) CrystalDecisions.Web.ReportAgent.u(Boolean N) CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e) System.Web.UI.Control.PreRenderRecursiveInternal() System.Web.UI.Control.PreRenderRecursiveInternal() System.Web.UI.Control.PreRenderRecursiveInternal() System.Web.UI.Page.ProcessRequestMain() -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573 in that page there's only 1 line binding the report source to the viewer: crystalreportviewer1.reportsource = ".\RoCryRpt1.rpt" any solutions
VIEWS ON THIS POST

190

Posted on:

Wednesday 21st November 2012
View Replies!

Connection problems

I am having problems connecting to an Oracle database, I have set everything up running against an Oracle 9i db with the client and ODP.Net data provider. I seem to however have problems establlishing connections, they take about 6 seconds to connect before data is retreived. Has anybody had this problem before and can anyone tell me how to speed up the intial connection process.
VIEWS ON THIS POST

261

Posted on:

Wednesday 21st November 2012
View Replies!

When using Form Builder to create a new form from TEMPLATE.fmb, there is an error

FRM-30064: Unable to parse statement select timezone_code,name ,to_char(trunc(gmt_offset),'S09') || ':' || to_char(abs(gmt_offset - trunc(gmt_offset))*60,'FM900') offset ,decode(daylight_savings_flag,'Y','*',null) dst_flag from fnd_timezones_vl where enabled_flag = 'Y' order by gmt_offset. ORA-00942: table or view does not exist Record Group TIMEZONES Form: TEMPLATE FRM-30085: Unable to adjust form for output. How can I fix this error
VIEWS ON THIS POST

244

Posted on:

Friday 28th December 2012
View Replies!

Collapse a matrix to a single line item

I think it would be best to use a simple example to explain my problem. The table below needs to become compressed into to distinct line items Customer_No Hair SP_Code Gender Age Colour Weight 1 blonde 123 M null null null 1 blonde 123 null 23 null null 1 blonde 123 null null Green null 1 blonde 123 null null null 98 1 blonde 123 null null null null 1 blonde 123 null null null null 1 blonde 123 null null null null 1 blonde 123 null null null null 2 Blue 444 F null null null 2 Blue 444 null 28 null null 2 Blue 444 null null Pink null 2 Blue 444 null null null 64 2 Blue 444 null null null null 2 Blue 444 null null null null 2 Blue 444 null null null null 2 Blue 444 null null null null Needs to become Customer_No Hair SP_Code Gender Age Colour Weight 1 blonde 123 M 23 Green 98 2 blue 444 F 28 Pink 64 Thank-you very much for your time. Banner: Oracle Database 11g Release 11.2.0.2.0 - 64bit Production PL/SQL Release 11.2.0.2.0 - Production "CORE 11.2.0.2.0 Production" TNS for Linux: Version 11.2.0.2.0 - Production NLSRTL Version 11.2.0.2.0 - Production I have over 163 000 'customers' and customer_no is not necessarily consecutive. There may not exist a customer 3 for example. ie Customer 1, Customer 2, Customer 4...etc. Is there any way to loop through the procedure and pick up the customer_no that exists in the Customer column
VIEWS ON THIS POST

193

Posted on:

Friday 28th December 2012
View Replies!

Inefficient VIEW

I have a view that gets used 3 times by another query and am being told that the view is inefficient. Any reccomendations on how I could change this I noticed this view is getting the value of acad_prog three times. Once from ps_acad_prog when finding the MAX of effdt, again from ps_acad_prog finding the MAX of effseq, and from ps_acad_prog when find the MAX of effdt from the ps_acad_plan_tbl. PHP Code: SELECTa.emplid ,a.acad_career ,r.effdt ,c.acad_plan ,d.descr ,a.institution ,a.acad_prog ,b.descr ,d.degree ,b.acad_group \tFROMps_acad_proga \t,ps_acad_prog_tblb \t,ps_acad_planc \t,ps_acad_plan_tbld \t,ps_ntsr_ref2_tblr WHEREa.emplid=c.emplid \tANDa.institution=b.institution \tANDa.institution=d.institution \tANDa.acad_career=b.acad_career \tANDa.acad_career=c.acad_career \tANDa.acad_prog=b.acad_prog \tANDa.acad_prog=d.acad_prog \tANDc.acad_plan=d.acad_plan \tANDa.effdt=c.effdt \tANDa.effseq=c.effseq \tANDr.emplid=a.emplid \tANDr.acad_career=a.acad_career \tANDr.institution=a.institution \tANDa.effdt=( SELECTMAX(prg.effdt) \tFROMps_acad_progprg WHEREprg.emplid=a.emplid \tANDprg.acad_career=a.acad_career \tANDprg.stdnt_car_nbr=a.stdnt_car_nbr \tAND(prg.acad_progBETWEEN'200'AND'309' \t\tORprg.acad_prog='350' \t\tORprg.acad_progBETWEEN'401'AND'457') \tANDprg.effdt
VIEWS ON THIS POST

78

Posted on:

Saturday 29th December 2012
View Replies!

Issue to get record from database as text file in oracle form

Hi all, im really new in oracle and want learn something new lesson to me...can i now if i got 10k data,i want to show each data in row as flat file in oracle form..which means i want one row with one display item.please help me...
VIEWS ON THIS POST

104

Posted on:

Sunday 30th December 2012
View Replies!

Not returning values?

I'm trying to do a count on the number of combinations of country/state codes that are invalid (in Australia) for driving licences. Code: select COUNTRY_CODE, STATE_CODE, count(*) from (select COUNTRY_CODE, STATE_CODE from CUSTOMER_TABLE where DRIVING_LICENCE is not null and not (COUNTRY_CODE in ('AUST') AND STATE_CODE in ('VIC', 'NSW', 'SA', 'QLD', 'NT', 'TAS', 'WA', 'ACT'))) group by COUNTRY_CODE, STATE_CODE The output is okay...for example I get these results: INT INT NZ SI NZ INT AUST INT NZ NSW NZ However, what I am missing is the combination of "AUST" & for country/state respectively. Am I writing the code correctly
VIEWS ON THIS POST

313

Posted on:

Monday 31st December 2012
View Replies!