SELECT [Department], [Last_Name], [First_Name], [Title], [Extension]
FROM [temployees] WHERE (([Department] = @Department) OR ([First_Name]
LIKE '%' + @First_Name + '%'))
this is my sql statement on my GridView but I can't get the values to
display?
--
Sent via .NET Newsgroups http://www.dotnetnewsgroups.com 7 1301
Are you getting an error? Do other sql statements on other gridviews
work? How are you passing in those parameters? Do hard-coded sql
statements work?
Show some snippet code and you will get an answer
Patrick
"VJ" <vn****@hotmail .com> wrote in message
news:Oq******** ******@TK2MSFTN GP09.phx.gbl... SELECT [Department], [Last_Name], [First_Name], [Title], [Extension] FROM [temployees] WHERE (([Department] = @Department) OR ([First_Name] LIKE '%' + @First_Name + '%'))
this is my sql statement on my GridView but I can't get the values to display?
-- Sent via .NET Newsgroups http://www.dotnetnewsgroups.com
This is my sqldatasource.. ...
<asp:SqlDataSou rce ID="SqlDataSour ce2" runat="server"
ConnectionStrin g="<%$ ConnectionStrin gs:dbPMAEventsC onnectionString %>"
SelectCommand=" SELECT [Department], [Last_Name], [First_Name],
[Title], [Extension] FROM [temployees] WHERE (([Department] =
@Department) OR ([First_Name] LIKE '%' + @First_Name + '%'))">
<SelectParamete rs>
<asp:ControlPar ameter ControlID="dpdD epartment"
Name="Departmen t" PropertyName="S electedValue"
Type="String" />
<asp:FormParame ter FormField="txtF irstName"
Name="First_Nam e" Type="String" />
</SelectParameter s>
</asp:SqlDataSour ce>
but the gridview gives me NO data at all
<asp:GridView ID="GridView1" runat="server"
AutoGenerateCol umns="False" DataSourceID="S qlDataSource2"
Font-Names="Arial" Font-Size="Smaller" Style="z-index: 109;
left: 140px; position: absolute;
top: 314px" Width="800px">
thanks
v
Have you tried your SQL statement using Query Analyzer?
Pls do that and is it possible to move your Sql statement to a stored
procedure
PAtrick
<vn****@hotmail .com> wrote in message
news:11******** *************@u 72g2000cwu.goog legroups.com... This is my sqldatasource.. ...
<asp:SqlDataSou rce ID="SqlDataSour ce2" runat="server" ConnectionStrin g="<%$ ConnectionStrin gs:dbPMAEventsC onnectionString %>" SelectCommand=" SELECT [Department], [Last_Name], [First_Name], [Title], [Extension] FROM [temployees] WHERE (([Department] = @Department) OR ([First_Name] LIKE '%' + @First_Name + '%'))"> <SelectParamete rs> <asp:ControlPar ameter ControlID="dpdD epartment" Name="Departmen t" PropertyName="S electedValue" Type="String" /> <asp:FormParame ter FormField="txtF irstName" Name="First_Nam e" Type="String" /> </SelectParameter s> </asp:SqlDataSour ce>
but the gridview gives me NO data at all
<asp:GridView ID="GridView1" runat="server" AutoGenerateCol umns="False" DataSourceID="S qlDataSource2" Font-Names="Arial" Font-Size="Smaller" Style="z-index: 109; left: 140px; position: absolute; top: 314px" Width="800px">
thanks v
Sorry, can't help you if you don't answer my original questions.
You can't use an expression in the select statement
you'll have to take out the "+" signs
er, you can't use an expression in the declarative property of the
sqldatasource i mean This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John Fabiani |
last post by:
Hi,
I'm a newbie and I'm attempting to learn howto create a select statement.
When I use
>>> string1='18 Tadlock Place'
>>> cursor.execute("SELECT * FROM mytest where address = %s",string1)
All works as expected. But
>>> numb=10
>>> cursor.execute("SELECT * FROM mytest where clientID = %d",numb)
Traceback (innermost last):
File "<stdin>", line 1, in ?
|
by: Jan |
last post by:
I store sql-commands in a database table. In the first step I get the
sql command out of the database table with embedded sql. In the second
step I try to execute the command, which i got from the database
table, using dynamic sql.
Executing 'EXEC SQL DESCRIBE SELECT LIST FOR S INTO select_dp;' the
error code -2149 is returned That means "Specified partition does not
exist".
Does anybody know if it is a database problem or a problem of
|
by: dumbledad |
last post by:
Hi All,
I'm confused by how to replace a SELECT statement in a SQL statement
with a specific value. The table I'm working on is a list of words (a
column called "word") with an index int pointing to the sentence they
come from (a column called "regret"). I also have a table of stop words
(called "GenericStopWords") that contains the words I do not want to
consider. That table has a single column called "word".
I started off using a...
|
by: 001 |
last post by:
Hello,
The select statement needs only 1 second to complete the query.
But the update statement spends 30 minutes. Why?
SELECT STATEMENT:
declare @IDate smalldatetime
select @IDate=col001 from USDay
select * from USDay A
|
by: Tcs |
last post by:
My backend is DB2 on our AS/400. While I do HAVE DB2 PE for my PC, I haven't
loaded it yet. I'm still using MS Access. And no, I don't believe this is an
Access question. (But who knows? I COULD be wrong... :) I've tried the
access group...twice...and all I get is "Access doesn't like ".", which I know,
or that my query names are too long, as there's a limit to the length of the SQL
statement(s). But this works when I don't try to...
| |
by: Grant McLean |
last post by:
Hi
First a simple question ...
I have a table "access_log" that has foreign keys "app_id" and
"app_user_id" that reference the "application_type" and "app_user"
tables. When I insert into "access_log", the referential integrity
triggers generate these queries:
SELECT 1 FROM ONLY "public"."application_type" x
|
by: Bob Stearns |
last post by:
I am getting duplicate rows back from a select distinct statement of the
form:
SELECT DISTINCT 'jhough', '000111', t0.bhid
FROM (SELECT lots of good stuff) t0
LEFT OUTER JOIN another_table t1 ON relevant_stuff
WHERE (lots of conditions)
After re-reading the relevant pat ofVol 1 of the SQL Reference I am
unablee to see how this is possible.
|
by: Steve |
last post by:
ASP error number 13 - Type mismatch with SELECT...FOR UPDATE statement
I got ASP error number 13 when I use the SELECT...FOR UPDATE statement
as below.
However, if I use SELECT statement without FOR UPDATE, it is fine and
no error.
I also tried Set objRs = objConn.Execute("SELECT * FROM EMP UPDATE OF
EMPNO"), but it still couldn't help.
any ideas? I tried to search in the web but couldn't find similar
|
by: microsoft.public.dotnet.languages.vb |
last post by:
Hi All,
I wanted to know whether this is possible to use multiple variables to
use in the select case statement such as follows:
select case dWarrExpDateMonth, dRetailDateMonth
case "01" : dWarrExpDateMonth="Jan" : dRetailDateMonth="Jan"
case "02" : dWarrExpDateMonth="Feb" : dRetailDateMonth="Feb"
End Select
|
by: FishVal |
last post by:
Hereby I'm proposing a way of convinient work with properties containing SQL Select statements, particulary RowSource property of ComboBox and ListBox.
The usual way is the following.
Private Sub Combo1_AfterUpdate()
Me.Combo2.RowSource = "SELECT ... FROM ... WHERE Table2.keyID=" & Me.Combo1 & ";"
Combo2.Requery
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |