Hi, I'm looking for doing a Pivot Table query in vb.net.
I've found a lot of code in c# but not in VB.Net and i don't understand how to convert c# to VB.
Can you help me?
Thanks
Ju
Hi all, i have a couple of sql views with composite primary keys that i want to query, and since Hibernate makes it a pain to work with composite keyes, im using createSQLQuery. The problem is that this method can only return a List, and i need to refer to the colums by their index.
Any chance i could do like jdbc and refer to the columns by their sql name insted of their index? thanks
I have a perl script, which takes a query string parameter, connects to a database and displays data.
I'd like to include that script in a PHP file like so:
include('perlscript.pl?item=302');
Such that the perl script's response is displayed on the PHP/HTML page.
How can I do this?
After processing form from POST I should redirect, to prevent user from hitting back. However, I am using form to determine search query on a database, so I need to either pass params to the redirected site or the result of a search. Or maybe there is some other good practice, how to solve this problem? Maybe in this situation I am allowed not to redirect (nothing happens, if user performs search again).
does anyone tried doing cache for spring-ntlm NtlmProcessingFilter.java file so that every request no need to query from microsoft active directory to authenticate user ? how to implement such cache using ehcache
Is this a correct way for id generation in MySQL ?
INSERT INTO Picture
(PictureId,First_pick,Title,Description,File_Name,Is_Vertical)VALUES
((SELECT max(pictureid)+1 FROM Picture),0,?,?,?,?)
I mean if it is guaranted that PictureId will be unique when this query is run by many threads ?
I can't modify table structure. Should I use any specific locks, index or transaction isolation level ?
Regards, Michal
Hi ,
Suppose I have a page abc.aspx in it I have a user control ucx123.ascx. I am fragment caching the user control and the cache is vary by param. The parameter is some id in the querystring.
I want to add a sql cache dependency with respect to sql query.
The scenario is I added the dependency but the cache is not invalidating
I have this query:
SELECT mt.*, fordon.*, boende.*, elektronik.*, business.*, hem_inredning.*, hobby.*
FROM classified mt
LEFT JOIN fordon ON fordon.classified_id = mt.classified_id
LEFT JOIN boende ON boende.classified_id = mt.classified_id
LEFT JOIN elektronik ON elektronik.classified_id = mt.classified_id
LEFT JOIN business ON business.classified_id = mt.classified_id
LEFT JOIN hem_inredning ON hem_inredning.classified_id = mt.classified_id
LEFT JOIN hobby ON hobby.classified_id = mt.classified_id
ORDER BY modify_date DESC
I need to implement a count here, to just count all rows in combination with the JOINS you see.
How should I do this?
SELECT COUNT(mt.*, fordon.* etc) FROM ? // This method wont work
Thanks
Hi guys,
In the Apple docs it says that
JavaScript execution time is limited to 10 seconds for each top-level entry point.
If your script executes for more than 10 seconds, Safari on iPhone OS stops executing the script at a random place
I plan to have some Javascript run every 10 seconds or so that will do an AJAX query to the server and rewrite just the section of the page necessary. Will this be possible with these restrictions on the device?
I have a simple SQL query (using SqlCommand, SqlTransaction) in .NET 2.0 that returns a table of integer-string pairs (ID, Name). I want to get this data into a dictionary like Dictionary.
I can get the result into a DataTable, but even iterating over it, I'm not sure how to do the typing and all that stuff. I feel like this must be a common problem but I haven't found any good solutions.
Thanks in advance.
I'm using the "join_table" function with Kohana's ORM to build a query. The following works:
$category = ORM::factory('category')->join_table('product');
But this doesn't:
$category = ORM::factory('category');
$category->join_table('product');
The documentation uses the second as an example, but it returns 0 while the first example returns "categories_products" which is correct. Any ideas?
I have a need to query an existing Sybase ASE database and would like to use Linq syntax for my data retrival.
I don't need write access, nor do I need the full set of Linq operators, just Select(),
SelectMany(), Where(), and GroupJoin()
What are options are available?
In particular, I'm wondering about nHibernate and building a new Linq2Sybase provider based on the IQ toolkit.
i have a query
OleDbCommand com = new OleDbCommand("select * from techs where actd0v between '" + TextBox1.Text + "' and '" + TextBox2.Text + "'" , con);
where textbox 1 and 2 are the specified dates in which i want to retreive some date related to those dates.but when i m trying to find the data between the given dates it gives me some dates which are not included in between them.is there any pattern i need to specify to get all the dates which occur in between the specified dates.
i m using ms access database for my project.
In Socket Programming, how will a Unix thread receive a Socket CLOSE event from a client if connection is closed?
Are there any API's which will notify the unix thread about the CLOSE event received?
As in Windows we have WSAEnumNetworkEvents API which gets the event notification for a specified socket descriptor. What will be the equivalent API used in the Unix socket programing?
Please provide the help for the query.
Hi,
Not really a coding question more a little help with my idea of a Relational database.
If I have 3 tables in a SQL database. In my php script I basically query the companies which are in industry "a" and then insert a row into a separate table with their details such as companyId , companyName etc is that a type of Relational database ?
I have explained it in a simple way so we don't get confused what I am trying to say.
I have two tables from two different Data Contexts. Although both tables are from the same database, two separate datacontexts exist.
Error msg: "The query contains references to items defined on a different data context."
How can I get around this? Any help is appreciated. Thanks.
I have a SQL Server 2000 database. When I run the following command
select * from sysindexkeys
This display the appropriate records.
I then do a DBCC command for the sysindexkeys. It doesn't display anything. Strange there is no page having the sysindexkeys records. Then how the query display the list of records.
Hi Following query is not working is there any problem with it?
var possibleSegments =
from epl in eventPotentialLegs
join sd in segmentDurations on
new {
epl.ITARequestID,
epl.ITASliceNumber,
epl.DepartAirportAfter,
epl.AirportId_Origin,
epl.AirportId_Destination
}
equals
new {
sd.ITARequestId,
sd.SliceIndex,
sd.OriginAirport,
sd.DestinationAirport
}
where
epl.DepartAirportAfter > sd.UTCDepartureTime
and
epl.ArriveAirportBy > sd.UTCArrivalTime
select new PossibleSegments{ ArrivalTime = sd.arrivalTime };
i have a pgsql table with fields id, identifier, name.
id serial NOT NULL,
identifier character varying(16),
name character varying(128)
I want to fetchAll values from the table orderby identifier.
but identifier is having values
12, 100, 200, 50
and after $table->fetchAll(null, 'identifier');
is giving the result
100, 12, 200, 50
but I want the result as
12, 50, 100, 200
or using a direct query?
Hi,
well for some strange reason IE gives me and InvalidAuthenticityToken error almost every time a POST query is used. Seems to be that IE does not like the "/" and "=" characters sometimes found in authenticity_token. So I wondered if anyone has actually found a solution to this?
More strange is that no other browser seems to behave that way.
Thanks in advance.
I am using sqlite database to store data. I have three tables: Invoice, InvRow, Invdetails.
Relationsip between the tables are:
Invoice.Id = InvRow.InvId
InvRow.Id = Invdetails.RowId
I need to delete related entries from three tables using a single query. How can I do that?
Any help?
hi i have a table with this elements
id name
1 luke
2 johnny
3 perry
4 jenny
5 mark
I have to do a query that take the first element and the lasts 2
i this example
1 luke
4 jenny
5 mark
how can i do?
thanks
Hi,
I use a MySQL DB, and I would like to update a filed in a table based on another. Something like:
UPDATE table1
SET field1 = table2.id
WHERE field2 IN (
SELECT table2.name
FROM table2
);
I know that this query wouldn't work, but here is the idea. Is that even possible to do?
Cheers,
Nicolas.
Hi..
I am creating stored procedure ,here code :
CREATE PROCEDURE `dbnm`.`getlogin`
(
IN uid INT,
IN upass VARCHAR(45)
)
BEGIN
if exists(select uphno,pass from user_master where uphno=uid and pass=upass)then
***true
else
***false
end if;
END $$
DELIMITER ;
i want return value(**true or **false) in stored procedure
from PHP by calling sp
PHP code:
$res = $mysqli->query('call getlogin("1","rashmi")');
how to acesss boolean value in PHP from sp?
Thanks