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

OracleTransaction passed as a variable by ref or value

$
0
0

I have inherited a legacy app written 10+ years ago.

It uses OracleTransactions in a main method and nested within methods therein.

The main method wraps its processing in a Try-Catch for comitting or rollingback the OracleTransaction.

In the main method and the nested methods the OracleTransaction is passed as a variable and tested for errors with in their Try-Catches.

The legacy code I have inherited passes the OracleTransaction to the child methods by ref and by value inconsistently.

Shouldn't OracleTransaction always be passed by reference  to be able to catch errors and bubble it up to the main method for comitting or rolling back; or is there some nuance that I am misunderstanding whereby OracleTransaction can be passed by value?


If else condition in oracle

$
0
0

Hello i want : that if unmarked value is null or "" then unmarkedon=SYSDATE else unmarkedon=unmarkedon

Please help me to sort  out

string notworkquerys ="Select SUM(TRUNC(unmarkedon-markedon)) as NotWorkeddays from trg_problem_history where trgcode='"+gettrgcode+"'

In Memory Database / Data caching

$
0
0

Hi All,

Our company is about to develop a product (Web application).

Scenario / Requirement:

The application is going to be used by multiple concurrent users (approx 50 to 70). The applications basic feature is to provide search. This search will be of different entities (name, place, organization, etc.). Further these entities are interlinked. 

Issue / Challenge:

So as to have better performance and lesser DB interactions we plan to store these entity objects in server RAM (in memory). And periodically update them. We are not able to finalize what approach to follow to achieve this. Some of the options we think of;

1) Asp.net Data Caching 

2) In memory databases. E.g. http://www.mongodb.com/what-is-mongodb

3) some thing else.

Kindly provide us inputs on this.

Any thoughts / comments highly appreciated.

Thanks in advance

TO_CHAR did not work

$
0
0

Hi

In Oracle table I have a field of type varchar2 contain date values of format MM/DD/YYYY

I need to write sql query to return the dates in DD/MM/YYYY format. I tried Select TO_CHAR(myfield, 'DD/MM/YYYY') but it gives error since the field is of type varchar2 not datetime.

ANy help

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

$
0
0

I created a database on site which gives me access DB from remote servers, but I always get:

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

On web.config

<add name="MySQLConnStr" connectionString="Driver={MySQL ODBC 5.2 UNICODE Driver};Server=sql5.freesqldatabase.com;Port=3306;Database=kareemva_xxxxxxxx;User=sqlxxxxxxxx;Password=sqlxxxxxx;Option=3;"/>

My ASPX file on kareem2.somee.com and on my PC, but the ERROR is like each other!

Who can I solve this problem?

What is wrong in that

$
0
0
CREATE PROCEDURE 'DL05sp' (IN timval datetime,IN resis float,IN BarCode1 varchar(150),IN BarCode2 varchar(150))
BEGIN INSERT INTO dl05 (TimeValue, Resistance, BarCode_1, BarCode_2) values (timeval,resis,BarCode1,BarCode2); END



ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'END
CREATE PROCEDURE 'DL05sp' (IN timval datetime,IN resis float,IN BarCode1 var' at
 line 1

The only thing is im trying to execute in mysql command line

Please help me

Thanks

Several Excel cells populated via SELECT COUNT(*)

$
0
0

Hello,

I have done only modest imports of SQL data into Excel so please bear with me if this is not too difficult. Basically, I have an Excel document where the cells contain an integer.  This integer is nothing more than a SELECT COUNT(*) of a database table.

What's the best way to handle this?  Should I create a separate SQL query for each individual cell?  I tried this on one of the cells by using the wizard "From Microsoft Query". However, when the data is imported it appears with the header Column1 and the count right below it.

e.g.

Column1

25

Thus, the data appears one cell lower in the document than I wish. All I want is the data, not the header.

But I'm even wondering if this is the best way to accomplish this. If I have 50 cells that need populating, for instance, is it really the most efficient to create a separate SQL query for each cell?

Thank you for any help you could lend. I appreciate it.

Using OleDB to combine several Excel files into one sheet

$
0
0

Hey everyone, I am trying to figure out how to use OleDB to build an excel file from several others.  I know I could use office Interop but this is generally a bad choice for servers so has anyone done this before and if so, do you have any code to show?  Thanks!


while passing a data to procedure getting PL/SQL Numeric value error

$
0
0

Dear Friends,

I am getting the below error while passing a data as a parameter to procedure.Kindly suggest me what is the issue 

<div>ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 1
</div> <div></div><div>Please do the needful</div><div></div><div> </div>

can't access database (mysql)

$
0
0

i have developed a web application, but when i run the debug mode, error occurs about can't access database.

below is my config file.

<connectionStrings>    <add name="SupplierContext" providerName="MySql.Data.MySqlClient" connectionString="Datasource=localhost;Database=test;uid=admin;pwd=1234;charset=utf8;" /></connectionStrings>

I found that my local computer does not has the mySQL database, is it I need to download a database into my local PC if thedatasource=localhost

anyone advice how can i access database according to the above config file.

anyone give me a link which version of mySQL database i have to install. thanks.

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. error to process excel file

$
0
0

I use new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=uploadedfile;Extended Properties=""Excel 8.0;HDR=NO;IMEX=1""");to process uploaded excel file, however I got  The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine error on production machine.

I search some solutions, download and installed

Microsoft Access Database Engine 2010
http://www.microsoft.com/en-us/download/details.aspx?id=13255

2007 Office System Driver: Data Connectivity Components
http://www.microsoft.com/en-us/download/details.aspx?id=23734

still I got same error, then I followed this link

http://www.itzoz.com/2013/03/how-to-solve-microsoftjetoledb40-and.html

Enabled "enable 32-bit applications" on application pool, then I found the whenever I try to connect the website, the application pool will stop, and give me service unavailable error. So, instead of install full office suit software on production web server, what should I do?

how to connect mysql 6.0 workbench to visual studio 2010

$
0
0

  I have installed my-sql-net-6.9.5, and mysql work bench,after that i created front end using c# webform in .net and tried to connect to database in visual studio through tools->connect to database->choose datasource, here it is not showing mysql database option.Please help to resolve this.

Thank you.

Solution:- In this video Connection to mysql  is clearly provided ( ASP.net Web Forms website Part-1 Connect with Mysql Database connection   https://www.youtube.com/watch?v=KIZqQgqYCIg )

how to connect mysql 6.0 to asp.net using ado.net for web applications

$
0
0

Hi Everyone,

                   I am creating one web application mini project using asp.net in visual studio 2010 ,i want to know code and procedure for connecting mysql to asp.net using ado.net.So please send the code as early as possible.

                                                                  Thank you,

Connect to MariaDB with Visual Studio/Entity Framework

$
0
0

More and more people seem to be using MariaDB these days, so i tired to google how to connect visual studio to the Database using entity frame. But i have been unable to find anything about this that works

Does anyone know how to do this?

The MariaDB is local on my computer

Thanks for your help

Changes in oracle DB should be reflected in Sql Server DB.

$
0
0

Dear Members,

I maintain data in two different databases using oracle 11g version andsql server 2008 R2 version, both are installed on the different servers. My requirement is  if i made any changes in oracle server Database should be reflected in Sql Server Database.

Based on my requirement, please give suggestions/links.


Strftime to format dd:mm:yy into sql

$
0
0

Hello guys, i have using phpmyadmin and using a query that give me many fields, a field is user_logindate, this field show date that the user login but, this date have a format strftime 1314206261 and i want show in this format dd:mm:yy. Then, how i can show date with format dd:mm:yy?
Thanks by answers.


Mysql setup for asp.net 5

$
0
0

Is there a mysql driver for the vnext version of asp.net? If so then can you please link to any documentation on how to link it up and use it in MVC 6? please keep in mind that I am new to .net. Thanks

When Microsoft excel 2010(.xlsx) file uploading the sheet values given wrong values.

$
0
0

Dear friends,

              When I’m going to uploading Microsoft excel 2010(.xlsx) file the sheet values are given wrong values. becoz i converted the entire sheet values are accounting format and when I’m going to read excel sheet through Microsoft.ACE.OLEDB.12.0 provider the 0 values are returns -(hyphen) values actually it's possible to Excel 2007(.xls) but here I used Microsoft.Jet.OLEDB.4.0 provider. Anybody had known this problem kindly support with me.

 

Thanks & Regards,

Parthiban K.

localhost connection

$
0
0

hi, i have installed sqlyong, but when i create a new connection with localhost port, it got the error about can't connect localhost (0)

when i can't create localhost port in my pc and use this connection by web application for system development.

mysql database connection

$
0
0

i have download sqlyog for my database mysql manange tool. when i create a new localhost connection, it prompts error

error  number 2003: can't connect mysql server on localhost(0)

how to fix it.

Viewing all 1350 articles
Browse latest View live