|
It's all in the documentation, plain to read:
"Property Value
The number of rows changed, inserted, or deleted; 0 if no rows were affected or the statement failed; and -1 for SELECT statements."
---
single minded; short sighted; long gone;
|
|
|
|
|
Well I know that is what it does, but logically it seems 0 would be more appropriate. I'm questioning someones design decision not you answer
|
|
|
|
|
Well, a zero would mean that there were zero records uppdated. As there shouldn't be any updated records, there shouldn't be any count of them either, so I can see how a value representing a non-count would be more appropriate than a count of zero.
---
single minded; short sighted; long gone;
|
|
|
|
|
That makes sense I suppose.
|
|
|
|
|
What is wrong in this ....In IE i can not see repeater control...
<%@ Page Language="C#" MasterPageFile="~/WebForms/MasterPage.master" AutoEventWireup="true" CodeFile="Query.aspx.cs" Inherits="WebForms_Login_Query" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="server">
<asp:Repeater ID="catlist" runat="server">
<HeaderTemplate>
<tr>
<td>
Amit Header
</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
Amit Item
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
<tr>
<td>
Amit Footer
</td>
</tr>
</FooterTemplate>
</asp:Repeater>
</asp:Content>
Amit
|
|
|
|
|
Are you actually binding data to it?
only two letters away from being an asset
|
|
|
|
|
|
If you are not binding anything to it then what's the point in using it?? Just create a HTML table.
only two letters away from being an asset
|
|
|
|
|
I have make code for file upload on webserver with resume upload, working on local server correctly but not on webserver
try to use codes like this , use 2 text boxes and one button, in first text box write c:\1.dat , in other textbox 2.dat, i.e file from your local harddisk c named 1.dat will copy on the servers folder uploads with name 2.dat, it works well on local server but error occurs on web server
the error is
"Could not find file 'c:\1.dat'. "
you can check this error by using different extension and size files.
By this code, file will not use web servers memory, file will transfers in chunks ( parts ) and append on the server, this is a very usefull thing if somebody want to upload large files in GB.
Please note before answering the problem that lots of FTP softwares available in the market that supports resume upload but on FTP server, not on normal http server as a normal user.
My code are working just like yahoo mail attachment with additional advantage of resume support.
codes are
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
public partial class _Default : System.Web.UI.Page
{
int bufferSize = 100;
int bytesRead = 0;
string ImagesFolder = "uploads";
string savePath;
string saveFile;
long sentBytes = 0;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
FileStream fs = new FileStream(TextBox1.Text, FileMode.Open, FileAccess.Read);
savePath = Path.Combine(Request.PhysicalApplicationPath, ImagesFolder);
saveFile = Path.Combine(savePath, TextBox2.Text);
fs.Seek(this.sentBytes, 0);
byte[] buffer = new byte[bufferSize];
bytesRead = fs.Read(buffer, 0, bufferSize);
while (bytesRead > 0)
{
AppendChunk(buffer, sentBytes, bytesRead);
this.sentBytes += bytesRead;
bytesRead = fs.Read(buffer, 0, bufferSize);
}
fs.Close();
}
public void AppendChunk(byte[] buffer, long offset, int bufferSize)
{
FileStream FSs = new FileStream(saveFile, FileMode.Append);
FSs.Write(buffer, 0, bufferSize);
FSs.Close();
}
}
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
But the codes are not working on real web server.
Thanks
Shailendra
|
|
|
|
|
Hi.How to show the Text in Hindi at browser without installing the hindi font at the client machine.
|
|
|
|
|
http://quillpad.in/new/quill.html
Type words in English and they will be produced in hind then copy and paste them on the browser
u dont have to download the fonts
|
|
|
|
|
i am using the below sample code for sort in repeater, it is sorting only in asc order, now i want to sort both direction, i am using defaultview.sort, using the same function
can anyone help me
Thankz
connection open()
strSql = "select fiel1,fie2 from tablename order by columname or (Request.QueryString("val"))"
Dim da As New OleDbDataAdapter(strSql, connection)
Dim ds As New DataSet
da.Fill(ds)
If Request.QueryString("val") = "" Then
repeater.DataSource = ds.Tables(0)
Else
ds.Tables(0).DefaultView.Sort = Request.QueryString("val")
repeater.DataSource = ds.Tables(0).DefaultView
repeater.DataBind()
End If
connectionclose()
|
|
|
|
|
Use your sql query in the followign manner it will sort the records in desecding order.
order by columname desc
The desc keyword followed by the column will arange the data into desecding order
with regards
Yogesh Agarwal
|
|
|
|
|
<br />
ds.Tables[0].DefaultView.Sort = Request.QueryString("val") + "desc";<br />
But you will probably want to add someway to toggle between asc and desc.
|
|
|
|
|
hi friend i want to convert any music file to.mp3 format .
how to do it. can i use window's service for .
If yest how do i do this. ( I am new to windows service pls tell me how will i set time to execute window's service )
thanks in advance.
|
|
|
|
|
i guess you gotta have encoders for converting music format one to another.
|
|
|
|
|
Dunno about 'any' file format, but I think that the WMP control can be used to convert to WMA, and mp3 if a codec is installed.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I have a textbox with autopostback property set to true and an event: OnTextChanged , now when the user hits the tab key, I want some information to be displayed in another textbox in my web form...I succeeded in doing that using the enter key only...but the tab key never postbacks to the server...how can I do that using the tab key??
|
|
|
|
|
using a javascript function u can convert the tab key preess to enter key press event...
in the form tag add
onkeydown="TabToenter()"
The Javscript function is
function TabToenter()
{
var intkey=window.event.keyCode;
if(intkey==9)
{
window.event.keyCode = 13;
}
}
i hope this will work....
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
thnx a lot, it worked ))))
|
|
|
|
|
nice solution ...well will it work for other controls also????
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
i m working on widows application..for connectivity to sql i want to give datasource in app config file..and in every page i wan to call that string
but i dont understand how to do that
can anyone help me??
$h@ma!|@
|
|
|
|
|
hi,
add a appconfig file to your application... and
add a key to that appconfig file..
eg:<
<configuration>
<appsettings>
<add key="DATASOURCE" value="MYDATASOURCE">
>
and in cs/vb file
<br />
string keyval = ConfigurationSettings.AppSettings["DATASOURCE"].ToString();<br />
<br />
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
thx but it is giving error i.e;
The name 'ConfigurationSettings' does not exist in the current context
$h@ma!|@
|
|
|
|
|
and i have written in app file
<configuration>
<rescue>
<connection>
<odbcname>rescue15
is it ok???
$h@ma!|@
|
|
|
|