|
Damn men, thanks you
i'm happy
five stars to you
|
|
|
|
|
i am witing the following function
StoredProcedureInformation is a class i want to eturn it.
public StoredProcedureInformation ReturnStoredProcedureInformation(int length)
{
StoredProcedureInformation[] sp = new StoredProcedureInformation[length];
return sp;
}
Am i right?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
No. You are trying to return an array of StoredProcedureInformation objects but the return value of your method is defined as a single instance of a StoredProcedureInformation object. You should change your code to:
public StoredProcedureInformation[] ReturnStoredProcedureInformation(int length)
{
StoredProcedureInformation[] sp = new StoredProcedureInformation[length];
return sp;
}
Paul Marfleet
|
|
|
|
|
ThanQ
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Hi
If you want to return StoredProcedureInformation
class instance you need to construct an unstance of this class and return it
in your code you construct an array of StoredProcedureInformation and return the array instance.
|
|
|
|
|
Disable the automatic tooltip of treeview nodes in C#
plz...
venki
|
|
|
|
|
this.treeView.ShowNodeToolTips = false;
|
|
|
|
|
thanx..
but in 2003 i am not getting ShowNodeToolTips property....
help me.....
venki
|
|
|
|
|
I have the below campaign class. It is serialized to xml in my code. However, I do not want it to serialize the field if it's set to it's default value. In my case, 0 and 2001-01-01T00:00:00-08:00 for int's and datetime's respectively.
How can I have the XmlSerializer ignore them? Is there a global setting for the XmlSerializer class or attributes I can set for each field?
public class campaign : RESTResource
{
public override String get_endpoint_url()
{
return campaign.endpoint_url;
}
public static string endpoint_url = "/campaigns/";
public int id;
public string name;
public int category_id; if 0; don't serialize
public string subject;
public string body;
public string thumbnail;
public string notes;
public int ad_id_source; //If 0; don't serialize
public int campaign_status_id;
public DateTime valid_after;
public int billing_code;
public DateTime created_at;
public DateTime updated_at;
}
/\ |_ E X E GG
|
|
|
|
|
|
Doesn't XmlIgnore completely ignore the field without any exception?
/\ |_ E X E GG
|
|
|
|
|
I am working on windows application with c#.net .
I am using FTPwebreuqest class for upload file on ftp.it works fine when there is no proxy between application and internet. but it doesn't work in proxy.
FtpWebRequest reqFTP;
if i use reqFTP.Proxy=new webproxy("proxyservername",port);
then it will display error message "FTP command doen't support in HTTP proxy".
my code is like this
FtpWebRequest reqFTP;
reqFTP = (FtpWebRequest)FtpWebRequest.Create("ftp://uri");
reqFTP.Credentials = new NetworkCredential("username", "pwd");
reqFTP.KeepAlive = false;
reqFTP.Method = WebRequestMethods.Ftp.UploadFile;
reqFTP.UseBinary = true;
reqFTP.UsePassive = true;
int buffLength = 2048;
byte[] buff = new byte[buffLength];
int contentLen;
FileStream fs = fileInf.OpenRead();
Stream strm = reqFTP.GetRequestStream();
contentLen = fs.Read(buff, 0, buffLength);
while (contentLen != 0)
{
strm.Write(buff, 0, contentLen);
contentLen = fs.Read(buff, 0, buffLength);
prbUpload.Value += contentLen;
}
strm.Close();
fs.Close();
Any one help me about proxy settings in FTPwebrequest?
Pritesh
|
|
|
|
|
http://www.enterprisedt.com/
I know it's not what you're looking for but maybe you should consider making use of their free component for VS. I used it and I loved it!
|
|
|
|
|
Thanks for reply
Free FTP doesn't support proxy server.
Need suggestions.
Pritesh Patel
|
|
|
|
|
Hi,
I have two tables in the same dataset. What I want to do is select a row in table 1 and copy the values in some columns from table 1 to table 2.
Should be easy and I think I'm making it difficult for myself with code like:
DataRow[] dr = this.mycourtsDataSet1.Court1.Select("BookingDate = '" + bookingDate.ToShortDateString() + "'");
DataRow nr = this.mycourtsDataSet1.CourtSchedule.NewRow();
nr["Date"] = bookingDate;
nr["Court"] = "1";
if (dr.Length > 0)
{
for (int i = 0; i < dr[0].ItemArray.Length; i++)
{
string test = dr[0].ItemArray.GetValue(i).ToString();
}
etc .......
Any suggestions as to where I can find some help on this.
TIA
Glen Harvy
|
|
|
|
|
Have you tried using BeginEdit() and EndEdit() on new row before anf after making changes?
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
It's making the change that I want help with, not how to save them.
Glen Harvy
|
|
|
|
|
Do you add the new data row in the second table?
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
DataRow[] dr2 = this.mycourtsDataSet1.Court2.Select("BookingDate = '" + bookingDate.ToShortDateString() + "'");
DataRow nr1 = this.mycourtsDataSet1.CourtSchedule.NewRow();
nr1["Date"] = bookingDate;
nr1["Court"] = "2";
if (dr2.Length > 0)
{
for (int i = 0; i < dr[0].ItemArray.Length; i++)
{
if (dr2[0].Table.Columns[i].ColumnName.ToString().StartsWith("T") && !Convert.IsDBNull(dr2[0].ItemArray.GetValue(i)))
{
nr1[dr2[0].Table.Columns[i].ColumnName.ToString()] = Convert.ToDouble(dr2[0].ItemArray.GetValue(i));
}
}
}
this.mycourtsDataSet1.CourtSchedule.Rows.Add(nr1);
this.courtScheduleTableAdapter.Update(mycourtsDataSet1.CourtSchedule);
mycourtsDataSet1.AcceptChanges();
Glen Harvy
|
|
|
|
|
dr.AcceptChanges();
Do your best to be the best
|
|
|
|
|
Hai All,
Can any one tell me how to create a mail box of a user without having the AD interface i.e. the mail box should be there for the user but that user should not be in the Active Directory.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hi all,
Am replacing a particular string with another string of a text file dynamically. but while doing this am putting them to a richtextbox also. the contents of this text file contains lot of HTML tags. right now am facing alignment problems. here is the code i have for replacing can some one help me with better solutions than mine
<------------------CODE---------------------><br />
public void ConvertFile(string Pathstring)<br />
{<br />
<br />
<br />
bool change = false;<br />
StreamReader re = File.OpenText(Pathstring);<br />
<br />
string test = "";<br />
string input = null;<br />
string fileName = Pathstring;<br />
while ((input = re.ReadLine()) != null)<br />
{<br />
<br />
if (input.Contains("XXX-XX"))<br />
{<br />
change = true;<br />
}<br />
if (change == true)<br />
{<br />
if (input.Contains(".jpg"))<br />
{<br />
if (test.Contains("XXX-XX"))<br />
{<br />
<br />
test = test.Replace("XXX-XX", GetFilename((input)));<br />
<br />
}<br />
}<br />
}<br />
test += input+"\r\n";<br />
}<br />
re.Close();<br />
richTextBox1.Text = test;<br />
}<br />
<------------------END OF CODE--------------------->
|
|
|
|
|
I see you've taken none of the advice you were given the other day ?
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 )
|
|
|
|
|
Yes if i give File.WriteAll, i tried but it was not working, cause its taking last file name and writing it on places of XXX-XX.
|
|
|
|
|
I don't follow you ?
if you create a string [] by calling File.ReadAllLines, you can iterate over the lines and call your method to get the filename, and then call File.WriteAllLines. Putting it in a richtextbox is superfluous, unless you want the user to hand edit the file. Even then, a text control makes more sense, b/c you don't have rich text to start with, do you ?
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 )
|
|
|
|