Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all 1350 articles
Browse latest View live

ASP.NET - search for keywords in word document

$
0
0

Need to search for two keywords in Word document

E.g..

Keyword1
Keyword2

Lines between both the keywords then needs to be returned.

Trying this but i couldn't get this to work even for single keyword search

using word = Microsoft.Office.Interop.Word;

object fileName = "D:\\Files\\Scan.doc"; //The filepath goes here
string textToFind = "Keyword1"; //The text to find goes here
Word.Application word = new Word.Application();
Word.Document doc = new Word.Document();
object missing = System.Type.Missing;
try
{
doc = word.Documents.Open(ref fileName, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing);
doc.Activate();
foreach (Word.Range docRange in doc.Words)
{
if (docRange.Text.Trim().Equals(textToFind,
StringComparison.CurrentCultureIgnoreCase))
{
Response.Write(docRange.Text);
}
}
}
catch (Exception ex)
{
Response.Write("Error : " + ex.Message);
}


Failed to find or load the registered .Net framework data provider

$
0
0

I want to move my application from Development to Production.

It is working fine in the Development Server. But when moved to Production, I am getting the below error.

Failed to find or load the registered .Net framework data provider.

I am using Oracle db.

Help me with the query

$
0
0

Hey Guys,

I m trying to build a query but not able to generate result. Please Look into my issue and suggest your inputs..

I have three table in which I store the following data.

Table A
iddata
1A
2B

IN Table B  & C > AID is referenced from Table A.

Table B
idAIDvalueorformula
11100
22A + 200
TABLE C
idAIDvalueorformula
11100
22A
32+
42100

what I want is I should get this result. but i am not able to read a string. can anyone help me solve this I'm using MYSQL Database.

A=100

B = 300

show two query results into one?

$
0
0

Hi guys.. How can i show two query results into one?

1) SELECT MONTH(start_date) as Month, COUNT(ID) as Count, SUM(capital) as CapitalAmount FROM customer_account GROUP BY MONTH(start_date)

returned result for first query
[Month], [Count], [CapitalAmount]
1, 32, 280
2, 13, 630
3, 25, 400

2) SELECT MONTH(paid_date) as Month, SUM(paid_amt) as CollectedAmount FROM loan_general GROUP BY MONTH(paid_date)

returned result for second query
[Month], [CollectedAmount]
1, 500
2, 800
3, 650

Expected Returned Result in 1 query.
[Month], [Count], [CapitalAmount], [CollectedAmount]
1, 32, 280, 500
2, 13, 630, 800
3, 25, 400, 650

possible to reduce table size?

$
0
0

Hi guys.. i have a table which contained 653 rows in it only. Is it normal if the table size is 46.4 MiB

Any idea to decrease the table size? TQ

CREATE TABLE `product_detail` (
  `PID` char(5) NOT NULL,
  `promoText` char(255) DEFAULT NULL,
  `desc1` text NOT NULL,
  `desc2` text NOT NULL,
  `desc3` text NOT NULL,
  `desc4` text NOT NULL,
  `desc5` text NOT NULL,
  `desc6` text NOT NULL,
  PRIMARY KEY (`PID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



excel data to database

$
0
0

I am trying this code.. to be able to transfer the uploaded excel file data into the database.

protected void Upload(object sender, EventArgs e)
{


FileUpload1.SaveAs(@"F:\G-Procurement\Files\" + "101" + ".xlsx");
String excelPath = FileUpload1.PostedFile.FileName;

string conString = string.Empty;
string extension = Path.GetExtension(FileUpload1.PostedFile.FileName);
switch (extension)
{
case ".xls": //Excel 97-03
conString = ConfigurationManager.ConnectionStrings["Excel03ConString"].ConnectionString;
break;
case ".xlsx": //Excel 07 or higher
conString = ConfigurationManager.ConnectionStrings["Excel07+ConString"].ConnectionString;
break;

}
conString = string.Format(conString, excelPath);
using (OleDbConnection excel_con = new OleDbConnection(conString))
{
excel_con.Open();
string sheet1 = excel_con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null).Rows[0]["TABLE_NAME"].ToString();
DataTable dtExcelData = new DataTable();

//[OPTIONAL]: It is recommended as otherwise the data will be considered as String by default.
dtExcelData.Columns.AddRange(new DataColumn[3] { new DataColumn("Id", typeof(int)),
new DataColumn("Name", typeof(string)),
new DataColumn("Salary",typeof(decimal)) });

using (OleDbDataAdapter oda = new OleDbDataAdapter("SELECT * FROM [" + sheet1 + "]", excel_con))
{
oda.Fill(dtExcelData);
}
excel_con.Close();

string consString = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
using (SqlConnection con = new SqlConnection(consString))
{
using (SqlBulkCopy sqlBulkCopy = new SqlBulkCopy(con))
{
//Set the database table name
sqlBulkCopy.DestinationTableName = "dbo.tblPersons";

//[OPTIONAL]: Map the Excel columns with that of the database table
sqlBulkCopy.ColumnMappings.Add("Id", "PersonId");
sqlBulkCopy.ColumnMappings.Add("Name", "Name");
sqlBulkCopy.ColumnMappings.Add("Salary", "Salary");
con.Open();
sqlBulkCopy.WriteToServer(dtExcelData);
con.Close();
}
}
}
}

This code keeps giving following error

: The Microsoft Office Access database engine cannot open or write to the file ''. It is already opened exclusively by another user, or you need permission to view and write its data.

After searching the net.. I gave full premission option in the security tab of the folder..

But still this error persists.. Can some one tell me..

<connectionStrings>
<add name = "Excel03ConString" connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:/G-Procurement/Files/101.xls;Extended Properties='Excel 8.0;HDR=YES'"/>
<add name = "Excel07+ConString" connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 8.0;HDR=YES'"/>
</connectionStrings>

The above is the connectionstring in the webconfig file.

C# code to update excel cell

$
0
0

Hi,

I need c# code to update an excel cell by searching on key word in specific range.

for example: from A1 to E20 cell range I will search on "hi" word.

if I found the word in cell, I will replace by "abc" and need to save excel.

How I can achieve this functionality.

Thanks.

ClosedXML - Carriage Return Within a Cell

$
0
0

I generate an Excel file with ClosedXML and I want to know how can I do a Carriage Return Within a Cell?

Thanks


Error (Parameter '@d1' must be defined) , mdaEmp_Att.Fill(dtEmp_Att)

$
0
0

Hello

I am using a MysqlTableAdapter having a select statement containing " @ " symbol.

Dim strEmp_Att = "select @d1:='2018-08-01' d; select @d2:='2018-08-31' e ;" &" select edsa.* " &"from edsa,(select @d1:='2018-08-01' d) p1,(select @d2:='2018-08-31' e) p2 " &"where InOutMode=1 and empno in(5,24)"

        Dim mdaEmp_Att As New MySqlDataAdapter(strEmp_Att, Con)
        Dim dtEmp_Att As New DataTable()
        dtEmp_Att.Clear()
        mdaEmp_Att.Fill(dtEmp_Att)
        gvwEmp_Att.DataSource = dtEmp_Att
        gvwEmp_Att.DataBind()

The "@" symbol is used to define MYSQL parameter but not DataAdapter parameter. 

I guess the "@" symbol becomes ambiguous and I am getting the following error:

Server Error in '/' Application.


Parameter '@d1' must be defined.

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: MySql.Data.MySqlClient.MySqlException: Parameter '@d1' must be defined.

Source Error: 

Line 17:         Dim dtEmp_Att As New DataTable()
Line 18:         dtEmp_Att.Clear()Line 19:         mdaEmp_Att.Fill(dtEmp_Att)Line 20:         gvwEmp_Att.DataSource = dtEmp_Att
Line 21:         gvwEmp_Att.DataBind()

ODP.NET and DataSource Wizard

$
0
0

Hi,

I'm (still) using Visual Studio 2010, and need to connect to some Oracle database. At first I did install Oracle Data Access Components (ODAC) - ODAC 12c Release 3 and Oracle Developer Tools for Visual Studio (12.1.0.2.1) latest version that support VS 2010. Open new website, add reference Oracle.DataAccess, and sucessfully created new Data Connection to server using ODP.NET managed driver. On new aspx page add gridview and when I want to create new data source using wizard there is no Oracle source type. 

Also tried with sql database source type but it is not working since I cant provide selected date value from dropdown list to query.

What to do and what I did wrong, I guess this is not OK?

Thanks for help, this is first time I'm using Oracle and VS 2010 combination.

the provider is not compatible with the version of oracle client

$
0
0

Hi there.

I have developed a web-api and used oracle.dataaccess file to connect to oracle database.

I published my web api in windows server 2008 r2 with ISS version 6.1 and my web-api works very well in there,oracle.dataaccess version is 4.112.3.0 and also oracle client has installed too.so far so good.

now I've migrated my web-api into windows server 2016 datacenter with IIS ver.1607 and, oracle.dataaccess version is 4.112.3.0 is used in my app and also oracle client has installed in this windows server  too.but I get an error in my web-api:

the provider is not compatible with the version of oracle client

  • oracle client 11.2.0 in both windows has installed 
  • Enable 32-Bit Applications = True

Script to extract excel filenames and their row count

$
0
0

I have like 500 excel files in a folder and I would like to output the filenames and their row count. Any efficient way?

Mysql output return error

$
0
0

my program keep displaying the id is null. how to get the last id

CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_insertlogin`(
 IN fristName VARCHAR(300), 
 IN surname VARCHAR(300),
 IN emailAddress VARCHAR(500),
 IN phoneNumber INT(11), 
 IN profileImg VARCHAR(300),
 OUT id INT(11)
)
BEGIN

     INSERT INTO user_access.user_account  
          ( 
            fristName                   ,
            surname                     ,
            emailAddress                ,
            phoneNumber                 ,
            profileImg                   
          ) 
     VALUES 
          ( 
            fristname                   ,
            surname                     ,
            emailAddress                ,
            phoneNumber                 ,
            profileImg                   
          );
		SELECT id = LAST_INSERT_ID();
          
END
 using (MySqlConnection sqlConn = _dbConnection.OpenConection())
                {
                    //-- prepares command
                    Dictionary<string, string> Parameters = new Dictionary<string, string>();
                    Parameters.Add("@fristname", objsr.fristName);
                    Parameters.Add("@surname", objsr.surName);
                    Parameters.Add("@emailAddress", objsr.email);
                    Parameters.Add("@phoneNumber", objsr.phone);
                    Parameters.Add("@profileImg", objsr.profileImg);

                    MySqlParameter output = new MySqlParameter("@id",MySqlDbType.Int32);
                    output.Direction = ParameterDirection.Output;

                    MySqlCommand cmd = _dbConnection.PrepareCommand(sqlConn, "sp_insertlogin", CommandType.StoredProcedure, Parameters);

                    result = cmd.ExecuteNonQuery();
                    int outval = (int)cmd.Parameters["@id"].Value;
                    long idd = cmd.LastInsertedId;

                    return result;
                }

Oracle server error

$
0
0

Failed to find or load registered .Net Framework Data Provider.

[ConfigurationErrorsException: 등록된 .Net Framework Data Provider를 찾거나 로드하지 못했습니다.]
   System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow) +1276480
   System.Data.Entity.Infrastructure.DependencyResolution.DefaultProviderFactoryResolver.GetService(Type type, Object key, Func`3 handleFailedLookup) +94
   System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +84
   System.Linq.WhereSelectArrayIterator`2.MoveNext() +102
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +200
   System.Data.Entity.Infrastructure.DependencyResolution.RootDependencyResolver.GetService(Type type, Object key) +61
   System.Linq.WhereSelectArrayIterator`2.MoveNext() +102
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +116
   System.Data.Entity.Infrastructure.DependencyResolution.CompositeResolver`2.GetService(Type type, Object key) +71
   System.Data.Entity.Infrastructure.DependencyResolution.DbDependencyResolverExtensions.GetService(IDbDependencyResolver resolver, Object key) +105
   System.Data.Entity.Core.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +543
   System.Data.Entity.Core.EntityClient.EntityConnection..ctor(String connectionString) +127
   System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings appConfigConnection) +110
   System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name, AppConfig config) +39
   System.Data.Entity.Internal.LazyInternalConnection.Initialize() +160
   System.Data.Entity.Internal.LazyInternalConnection.CreateObjectContextFromConnectionModel() +16
   System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +648
   System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +25
   System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +77
   System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() +21
   System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() +63
   System.Linq.Queryable.Where(IQueryable`1 source, Expression`1 predicate) +61
   Charmsarang.Controllers.CommunityController.Gallery(Nullable`1 page) in D:\a\1\s\Charmsarang\Controllers\CommunityController.cs:328
   lambda_method(Closure , ControllerBase , Object[] ) +145
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +229
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +67
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +72
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +386
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +38
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +186
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +65
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +44
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +65
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +399
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +157
<entityFramework><defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework"><parameters><parameter value="System.Data.SqlServerCe.4.0" /></parameters></defaultConnectionFactory><providers><provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /><provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /><provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" /></providers></entityFramework><system.data><DbProviderFactories><remove invariant="Oracle.ManagedDataAccess.Client" /><add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /><remove invariant="System.Data.SqlServerCe.4.0" /><add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /></DbProviderFactories></system.data><oracle.manageddataaccess.client><version number="*"><dataSources><dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " /></dataSources></version></oracle.manageddataaccess.client>

I am using an Oracle database.

When publishing to the server, the following error occurs:

Help me!!

Querying OLAP cubes Oracle from ASP.NET MVC

$
0
0

Hi,
we have an asp.net mvc web site with sql server database.
We need to query a OLAP cubes Oracle with millions of records for create ad-hoc reports.
What is the best way for make report at runtime without stress the web server?

Thanks in advance


Convert string to time

$
0
0

I have column named Regn_time its datatype is nvarchar(4). for instance when I select regn_time its value is1254 something I want to convert it as 12:54 am or pm

 

how would I do that in oracle sql developer?

Here is the query

select a.S_CODE,a.PQA_REG_NO,TO_CHAR(a.ARRIVAL_DATE ,'YYYY/MM/DD')ARRIVAL_DATE,a.REGN_TIME,a.DRAFT_FAR,a.DRAFT_AFT,  a.LOADING_PORT,a.STATUS,a.AG_CODE,TO_CHAR(a.FROMDATE ,'YYYY/MM/DD')FROMDATE,TO_CHAR(a.TODATE ,'YYYY/MM/DD')TODATE,a.ACTIVEFLAG,a.TOTIME,a.EXPECTED_SEQ_NO,a.REMARKS,  
 d.weight,d.ct_code,d.imp_exp,d.tonnes_tues,  b.S_NAME,b.S_LOA, b.C_CODE,ct.CT_DESC,  
(select C_NAME from country where C_CODE = b.C_CODE)C_NAME, (select AG_DESC from shipping_agency where AG_CODE = a.AG_CODE)AG_DESC FROM ship_anchorage_master a  
inner join ship b on a.s_code = b.s_code  
inner join ship_anchorage_detail d on a.s_code = d.s_code and a.pqa_reg_no = d.pqa_reg_no inner join cargo_type ct on ct.CT_CODE = d.CT_CODE where a.status = 'O' and ACTIVEFLAG = 'Y'

ODBC excecption?

$
0
0

Hi,

i am receiving below error when trying to make connection with oracle. what could be the solution?

ERROR [08S01] [Microsoft][ODBC driver for Oracle][Oracle]ORA-03113: end-of-file on communication channel
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).

Thanks in advanced.

Oledbreader Microsoft.Jet.OLEDB.4.0 truncating fields when reading from xls file post windows update KB4462926

$
0
0

On windows 8.1 system  

Prior to this update a xls file was read successfully so header fields containing EmployeeNumber , Address, etc were read correctly - Having applied KB4462926 the same unchanged code now returns each field truncated by 2 characters so EmployeeNumb,Addre

Also the subsequent row fields all have their individual values truncated by two characters  also 

Rolling back the windows update results in the correct behaviour again 

So question is what has changed in this update to affect Microsoft Jet Ole Db  and how can we work around it 

Same issue found on other windows systems having applied their equivalent update 

code as follows 

  Try
                Using reader As IDataReader = ReadExcelByteArrayToDataTable(dataStream, filePath)
                    While (reader.Read())
                        Dim rawValues(reader.FieldCount - 1) As Object
                        reader.GetValues(rawValues)     ''-this is where rawValues show as truncated 

                    End While

'' Copy stream to xls file and read 

 Private Shared Function ReadExcelByteArrayToDataTable(dataStream As Stream, ByRef filePath As String) As IDataReader
            filePath = String.Format("{0}\{1}.xls", StaffcareApp.TempPathPhysical, Path.GetRandomFileName())

            ' Save bytes to temp file
            Using fileStream As FileStream = New System.IO.FileStream(filePath, System.IO.FileMode.Create, System.IO.FileAccess.Write)
                dataStream.CopyTo(fileStream)
            End Using

            ' Read excel file to datatable
            Dim connectionString As String = String.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=""Excel 8.0; HDR=No;IMEX=1""", filePath)
            Dim conn As New OleDbConnection(connectionString)
            conn.Open()
            ' get sheet name
            Dim dtSchema As DataTable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "TABLE"})
            Dim sheetName As String = dtSchema.Rows(0).Field(Of String)("TABLE_NAME")

            Dim command As New OleDbCommand(String.Format("SELECT * FROM [{0}]", sheetName), conn)
            Return command.ExecuteReader(CommandBehavior.CloseConnection)

        End Function

IIS crash with ntdll

$
0
0

I have a problem with Entity Framework connect to Oracle Database. I'm using DebugDiag to get the dump file.

mscorlib_ni!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.
Threading.ContextCallback, System.Object, Boolean) 
mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threadin
g.ContextCallback, System.Object, Boolean) 
mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threadin
g.ContextCallback, System.Object) 
[[GCFrame] 
[[ContextTransitionFrame] 
mscorlib_ni!System.Threading.SemaphoreSlim.WaitUntilCountOrTimeout(Int32, UInt32, System.Threading.C
ancellationToken) 
mscorlib_ni!System.Threading.SemaphoreSlim.Wait(Int32, System.Threading.CancellationToken) 
System_ni!System.Collections.Concurrent.BlockingCollection`1[[System.__Canon, mscorlib]].TryTakeWith
NoTimeValidation(System.__Canon ByRef, Int32, System.Threading.CancellationToken, System.Threading.C
ancellationTokenSource) 
mscorlib_ni!System.Threading.Tasks.Task.Execute() 
mscorlib_ni!System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) 
mscorlib_ni!System.Threading.Tasks.Task.ExecuteEntry(Boolean) 
mscorlib_ni!System.Threading.ThreadHelper.ThreadStart(System.Object) 
[[HelperMethodFrame_1OBJ] (System.Threading.Monitor.ObjWait)] System.Threading.Monitor.ObjWait(Boole
an, Int32, System.Object 
Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Sinks.RollingFlatFileSink.WriteEntries() 
mscorlib_ni!System.Threading.Thread.Sleep(Int32) 
OracleInternal.SelfTuning.OracleTuner.DoScan() 
OracleInternal.SelfTuning.OracleTunerBase.TuningFunction() 
OracleInternal.SelfTuning.OracleTuner.TuningFunction() 
mscorlib_ni!System.Threading.ThreadHelper.ThreadStart() 
[[HelperMethodFrame] (System.Threading.Thread.SleepInternal)] System.Threading.Thread.SleepInternal(
Int32

Hope someone knows a solution or can get me started?

Regards,

Phong

Auto increment in vb.net and oracle table

$
0
0

How can I insert a new number inside table of the oracleDB. For next insertion increment by 1 like that it goes on [Just like Auto increment of column by placing it as bigint and increment by 1]

when I tried as below

cmd.CommandText = "Insert into inciden(number) values(id.nextval)"

Sequence not exist message is showing.

Tried as below also:

SELECT TOP(1) NUMBER FROM incident BY 1 DESC

but error

Appreciate the Help

Viewing all 1350 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>