|
How to sql query the next row of data if has null values?
If user will search a code in a textbox,
let say 1002, then the result on the
second textbox should 1003.
let say 1008, then the result on the
second textbox should 1009.
but if the search code is 1011 then
the second textbox has no result.
Goal is to get the first NULL values only.
TableName:tblCode
Code CodeName
1001 aaa
1002 bbb
1003 NULL
1004 NULL
1005 NULL
1006 NULL
1007 abc
1008 aac
1009 NULL
1010 bba
1011 cca
1012 aab
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
Select Top 1 Code
From tblCode
Where Code > @Code And CodeName Is Null
Order By Code
@Code = input from first text box
|
|
|
|
|
thanks a log s_magus,
i never think about select top. i always use MAX,MIN.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
using Top, we can make a lot good queries.It also got enhanced in SQL 2005.
Click here
|
|
|
|
|
i'm getting an error that
"Cannot insert explicit value for identity column in table 'Comment' when IDENTITY_INSERT is set to OFF"
i'm using "LINQ to SQL" in ASP.NET
so how can i set IDENTITY_INSERT to ON?
|
|
|
|
|
use a stored procedure
"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
"Let me get this straight. You know her. She knows you. But she wants to eat him. And everybody's okay with this?"
|
|
|
|
|
How ?
Help people,so poeple can help you.
|
|
|
|
|
Why are you trying to insert an identity value? These are usually incremented automatically when a row is inserted into the DB and inserting your own value could cause a duplication in this column. You can open the table in Management Studio and turn off the indentity property for the column.
Mike
|
|
|
|
|
i'm using BlogID as primary key in Blog table & as a foreign key in Comment table.i'm trying to save BlogID manually in comment table from Query String in comment page.Tell me how i can do it?
|
|
|
|
|
|
Hi fellows,
How could i access an ms outlook public calendar and add events or appointment through code into that calendear?
Could anyone of you suggest me some guidelines.
Thanks
|
|
|
|
|
|
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
|
|
|
|
|
|
|
Hi,
I dont work with vb.net I added this code in the file Default.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br />
fldRoles.Text = String.Format("User {0} has in the following roles:", My.User.Name)<br />
For Each arole As String In Roles.GetRolesForUser(My.User.Name)<br />
fldRoles.Text += String.Format("<br/>{0}", arole)<br />
Next<br />
If My.User.IsInRole("AdminModule1") Then<br />
Response.Redirect("adminM1/nn.aspx")<br />
Response.End()<br />
ElseIf My.User.IsInRole("AdminModule2") Then<br />
Response.Redirect("adminM2/nn.aspx")<br />
Response.End()<br />
ElseIf My.User.IsInRole("AdminModule3") Then<br />
Response.Redirect("adminM3/nn.aspx")<br />
Response.End()<br />
<br />
End If<br />
End Sub but no result
Thanks
|
|
|
|
|
Hi To All,
Please help me to solve my problem.
I am developing a web application. In that I need To Scan Document Through Scanner. I am not getting how i should implement, What resources I should use to get the device. I also want to set the path through code and after scanning the image, It should be displayed on My webPage.
Please Help Me. And I will be glad if you Reply with Sample Code.
Thanks & Regards
Sanket Patil
.
|
|
|
|
|
Hi,
I use a package from "VintaSoft Twain.NET SDK" for scanning. Really easy to use and implemented. I am new to C# dev and I managed to build a scanning app in a day or two. They inlcude a sample application to get you started. (http://www.vintasoft.com/[^])
Cheers
Q
|
|
|
|
|
Hi,
I have a webform with many controls. On click of a button a jquery modal window populates with the details of say products of an organisation. in the popup these results are being rendered thru a webservice and bound to a gridview. on selecting any one product I want to transfer all the details back to main form and close the modal. Also if user doesn't want any of the products, user should just close and come back to main page.
Till now I have been able to get a jquery modal in button click and have loaded the other aspx form in the modal dialog. I am able to pass hardcoded values but unable to pass selected parameters !! Also I cannot return the values back from the aspx loaded in modal back to parent form.
<pre>
$(
function(){
/* Modal Dialog Box Configuration */
$(
"#addproductsForm").dialog({
autoOpen:
false,
modal:
true,
overlay: {
"background-color": "#000",
"opacity": "0.5",
"-moz-opacity": "0.5"
}
});
$(
"#btnAddSession").click(function(event){
$(
"#addproductsForm").dialog("open");
//event.preventDefault();
return false;
});
});
<
div id="addproductsForm" title="Dialog Title" >
<
iframe src = "WebForm4.aspx?id='jack'&id2='jill'" width="480"></iframe>
</
div>
</pre>
How do i trap the click event of the gridview checkbox select to send the vales back to the parent window and also close the modal
|
|
|
|
|
problem solved already...
suchita
modified on Monday, January 31, 2011 10:39 AM
|
|
|
|
|
I want to check event when textBox get focus.
i search internet and find out a way which use javascript.
Blow address is which i found out.
http://ryanfarley.com/blog/archive/2004/12/21/1325.aspx
but i want to control in server control.
Is it possible?
Have a nice Day.
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Use the JavaScript way and fire a PostBack from the client-side.
|
|
|
|
|
Hi,
I'm using at my application a serval sessions.
For ex:
Session["StartTime"]
Session["EndTime"]
Session["UserName"]
and i'm trying to give them a time out
I tried to add to the web.config:
<SessionState TimeOut="60"/></
But it dosen't work.
How i can give each session a time out?
Can someone please help me?
|
|
|
|
|
You are somewhat confused about what Session is. Session is one single object. You do not have three Sessions, you have three Session variables.
ASP.NET Session State Overview[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
error web service hexadecimal value 0x0E, is an invalid character.
what is soluation for this problem?
Regards,
Rami Sa'id Abdalhalim
Technical Team Leader
Amman Commercial Complex
Ommayah Str. Al-Abdali
Tel: +962 6 5696500 Ext.235
Mobile:+962 79 5366016
Email:r.abdalhalim@alghanem.com.jo
www.alghanemgroup.com
|
|
|
|