|
I have a javascript function which passes as a query string value another query string.
In other words, I want the query string to be:
http://www.somesite.com/?somequery=%3fkey%3dvalue1%2520%26%2520key2%3value3
However, if I redirect like this:
var url...
Started by bmwbzz on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
E' var query= '?a=b&c='+encodeURIComponent(c); var uri= 'http://www.example.com/script?query='+encodeURIComponent(query); window.location= uri;
Takes me to:
http://www.example.com/script?query=%3Fa, but you will end up in ....
|
|
I have a datatable that i want to query. the query is very large and complicated and it works when i run it in the SQl Server Editor - so i have the query text.
i need to query the datatable with this query String. To Translate the query into linq will...
Started by Rodniko on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can use a SqlCommand , like this:
using(var connection = new SqlConnection("connection string")) using(var command = new SqlCommand(@" your very long query ", connection) using(var reader DataTable(); using(var connection = new SqlConnection....
|
|
In asp.net MVC I have a search action in my controller and I am trying to decide If I should pass the query to my repository as a string
public ActionResult Search(string query) { return View(_repository.ListPeople(query)); }
or as individual parameters...
Started by Graham on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Looking at it from a separation of concerns query strings....
Repository be in charge of getting data, it shouldn't have to do any kind of parsing of a query string take on the responsibility of parsing a query string.
|
Ask your Facebook Friends
|
I have SQL Server 2005 Report that takes a parameter in a query string that searches customer names. The problem is some customers like to put in a middle initial so when the user 'John Smith' this does not bring up 'John Q. Smith'.
Using only sql, how...
Started by x13 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can use a user-defined split function, like the one here and use that something like this:
SELECT * FROM SomeTable t WHERE NOT EXISTS (SELECT * FROM dbo.Split('John Smith', ' ') s WHERE t.NameColumn NOT LIKE '%' + s.Data + '%')
You'd need to see how... .
|
|
I have a collection of MyClass that I'd like to query using linq to get distinct values, and get back a Dictionary as the result - but can't figure out how I can do it any simpler than I'm doing below. Does anyone have some cleaner code that I can use...
Started by Scott Ivey on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Here, I just leave it // show how to use OrderBy in a LINQ query myClassCollection.OrderBy(mc =>.
|
|
Hi, I am trying to request a webpage from an iis web server that I control utilising query strings.
E.g., I have a webbrowser control in my winforms app and request a page similar to "www.site.com/getpage.ashx?field=afsfgwesar+sere"
When i try to run ...
Started by Grant on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Www.site.com/getpage.ashx?field=afsfgwesar%2Bsere
The HttpUtility class has methods to URL....
You can insert %2B to "get" the plus symbol after the URL is decoded .
The + symbol is replaced with a space character because spaces are not allowed characters .
|
|
How to converse access query to sql server query string by programing?
example for access query string
SELECT dbo_VNMST.VISITDATE, dbo_VNTREAT.TREATMENTCODE, dbo_VNMST.HN, dbo_VNMST.VN, dbo_VNTREAT_1.TREATMENTCODE, Count(dbo_VNMST.HN) AS CountOfHN, dbo...
Started by monkey_boys on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
In addition to what Kane posted, you'll also need to replace the underscore... .
You'll need to use the SUBSTRING function instead of the MID function, replace double quotes with a single quote and remove the hash (#) identifier for your BETWEEN statement .
|
|
I have a query string like the one given below:
http://localhost/project/viewMember.php?sort=Y2xhc3M=&class=Mw==&page=9
Now variable: page in query string can be anywhere within the query string either in beginning or middle or at end (like ?page=9 or...
Started by Ashish Rajan on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Use parse_url to get the query into an array
unset the key that....
Use parse_str to convert the query string I can think of, although it is more complex than the other methods.
string from the url (or write your own function).
|
|
I have a query saved in the queries section. I am running the query from VBA. Is it possible to save the results of this query to a string?
Started by every_answer_gets_a_point on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you are trying to return a single string item based on a single criteria your best bet is a Dlookup:
Lookup = Nz(DLookup(....
The query you are running is literally a query against.
Taking a complete shot in the dark here...
|
|
I am going to answer my own question because I just found the answer, but thought it still worth posting here.
I am looking for a way to concatenate the strings of a field within a group by query. So for example, I have a table:
ID COMPANY_ID EMPLOYEE...
Started by Guy C on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Into an array, which can then be used by application code, or combined with array_to_string functions? At least on 8.4 this works out of the box:
SELECT company_id, array_to_string(array_agg.
|