I have a PHP application that I want to switch from MySQL to Cache DB. I was wondering if I could somehow use a JDBC connection since Cache doesn't come with a PHP connection?
Thanks
I choosed a web project in order to do that i am using an IDE (Eclipse), database (DB2 universal driver) and Apache Tomcat server. So, by gods grace every thing has gone well but when I try to update data to DB2 database through JDBC code then I am getting an SQL DB error as
:: DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: DB2ADMIN.REGISTER
where register is my table name and even i logged in as db2admin but i think there is no connectivity established but still its not resolved
Query:
select t1.col1
from table1 t1
inner join with (nolock) table2 t2 on t1.col2 = t2.col1
Am trying to use nolock option for optimized query in mySQL db, but for some reason the above query
does not work and the error i receive is
You have an error in your SQL syntax;
Any thoughts?
I have a dictionary in jsons form like this:
$user = "{ name: Mary , born: 1963, money: 213 }";
I need to pass it throught this field:
<input type="hidden" name="custom" value="" >
and then insert it in the db:
INSERT INTO user ( name, born, money ) VALUE ( $name, $born, $money )
How can I do that ?
I have a report developed with Crystal '08 and it is published on CMC.
My problem is when I changed the database to the production db, the report still asking for the development database password.
I've tried to publish the report with a diferent name, but it didn't work.
Thanks for your help!
Hi
I am using two different databases for my project.
Oracle and apache derby and trying to use as much as possible ansi sql syntax supported by both of the databases.
I have a table with column amount_paid NUMERIC(26,2), in a table.
My old code which was using oracle db need to retrieve value in this format
SELECT LTRIM(TO_CHAR(amount_paid,'9,999,999,999,999.99')) .
How can i do this using ANSI sql syntax.
If you do a search for:
http://www.google.co.uk/search?q=0x57414954464F522044454C4159202730303A30303A313527&hl=en&start=30&sa=N
you will see a lot of examples of an attempted hack along the lines of:
1) declare @q varchar(8000) select @q = 0x57414954464F522044454C4159202730303A30303A313527 exec(@q) --
What is exactly is it trying to do? Which db is it trying to work on?
Do you know of any advisories about this?
If I deploy N pl/sql packages to Oracle DB, can I make their compilation atomic i.e. the changes in these packages will be applied after the successful compilation of all packages?
Could anyone help me please in JQuery?
I have two tables on my site leftTable and rightTable with same column names. The leftTable I fill up from a DB, but the rightTable it just contains some rows. What I would like to do is to not show (or remove) in the leftTable those rows which are exist in the rightTable!
I Tryed this:
$("#tableLeft tr").each(function ()
{if ($(this).find("td")[0].innerHTML == $("#tableRight tr").find("td")[0].innerHTML) {$(this).remove;}});
Hi,
i have an strange problem. I want to select "timestamps" from an DB Table with Distinct and orderded by timestamp.
ID TimeStamp
-- ---------
1 123456789
2 123456789
3 333333333
4 334345643
In my PHP Script:
$sql = "SELECT DISTINCT TIMESTAMP FROM TIMESTAMPS ORDER BY TIMESTAMP"
When i use order by, the values are returned twice? Without order by the
result is correct.. but not sorted.
We are using Oracle 10g
Any ideaS?
So, MongoDB defaults to "AND" when finding records. For example:
db.users.find({age: {'$gte': 30}, {'$lte': 40}});
The above query finds users = 30 AND <= 40 years old.
How would I find users <= 30 OR = 40 years old?
i have list of student who have Nintendo DSs, and they should log in my website to solve some sheets (by using DS Opera browser), when they logged in , (status filed at my DB will change from 0 to 1),also the status change to 0 if they log out, what i need is when the student didn't log out and Shut down their DS's , the status should be 0,,
i don't have an idea to it,
any suggestion would be helpful for me ..
FYI ,DS opera browser limitation here
I have to create an SQL Query to get all rows starting with a specific character, except if the parameter passed to the (PHP) function is 0, in that case it should get every row that does not start with A - Z (like #0-9.,$ etc).
What is the easiest and fastest way to get those rows?
DB: MySQL 5.1
Column: title
Fatal error: Call to a member function result() on a non-object in C:\wamp\www\system\application\models\users_model.php on line 8
<?php
class Users_model extends Model {
function get_records()
{
$query = $this->db->get('users');
return $query->result();
}
}
?>
I need to have a button that calls a php function to resort displayed data from the db. How the heck do I do this? I just found out that because php is server side this sucks. So any help please?
In .NET land I would normally query the database and populate a generic List kind of collection. Then the app would use this.
In Android land I have been reading about DB access and use in apps. Why do most of the docs show the use of a cursor and use of constants to access it? Is this to save on resources perhaps?
So I am in Excel trying to read the last saved metadata from an Access database, but I cannot figure out how on earth to do this.
If I use environ$("username") it will give my the last saved information for the excel document where I am coding, not the access db that I want it to grab from. Excel has a built in function for grabbing username data, but I cannot find one for access.
How can I do this?!
Any help is greatly appreciated!
Hi,
I'm starting learning Ruby on Rails. So my application, like every Rails app, has three databases:
Development
Test
Production
And the question is: how do i switch from a db to another?
Thanks
while using
USE mssqltips_tde;
CREATE DATABASE ENCRYPTION KEY with ALGORITHM = AES_256 ENCRYPTION BY SERVER CERTIFICATE TDECert
GO
getting error
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword
'KEY'. Msg 319, Level 15, State 1,
Line 3 Incorrect syntax near the
keyword 'with'. If this statement is a
common table expression or an
xmlnamespaces clause, the previous
statement must be terminated with a
semicolon.
please help in resolving the same as i need to implement Encryption on my DB
Is it possible to override methids for db.Model in Google App Engine?
I want to declare beforeSave, afterSave methods, etc.. to create automatic tagging system.
I know there are hooks, but it seems to me a wrong way to solve this issue :)
Thanks!
Hi all, in Firebird the only way to have an auto increment coloumn is to setup a generator and use it with a trigger.
In H2 db there are auto_increment and identity keywords to do it.
What is the best way?
Mysql use auto_increment too, but there is some problems with cuncurrence read and table lock, isn't true?
Thank you.
Im using reflection to acess a class tha represents a table in DB.However,reflection read all properties of that class,and im wondering if there're some atributte in c# we can use to avoid read that propertie.
i.e:
[AvoidThisPropertie]
public string Identity
{
get;
set;
}
I would like to perform a SQL XML insert (on MSSQL), and in this case I need to insert a list of files into the DB (this is simple enough). However, there's an auto generated PK column (ID), and I need the ID for each newly created filename without performing a 2nd query. Is this possible? I guess it doesn't matter if the result is/isn't XML, but the input certainly has to be.
I have created a TransactionScope and within the scope various items are created and updated in the database. During this process I make a lot of calls to the database. Originally I opened a SqlConnection in the beginning of the TransactionScope and passed it around to any function that made a DB call then I closed the connection after all the calls are made and before the transaction commits. Is it better to do this or to open and close a connection for each call?
Hi,
I have a method which handles a set of records.This method,return true\false after processing.So,if all the records are processed(doing some db updates),will return true.Now,suppose after processing 1 record,some exception is thrown,should I write result=false(at the end of method result is returned) in catch block? And,allow processing of other records to be done?