Click here to Skip to main content
15,890,947 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# code is only inserting a few records. Pin
Norris Chappell29-Jun-15 5:04
Norris Chappell29-Jun-15 5:04 
GeneralRe: C# code is only inserting a few records. Pin
PIEBALDconsult25-Jun-15 10:10
mvePIEBALDconsult25-Jun-15 10:10 
GeneralRe: C# code is only inserting a few records. Pin
Norris Chappell25-Jun-15 10:35
Norris Chappell25-Jun-15 10:35 
GeneralRe: C# code is only inserting a few records. Pin
Sascha Lefèvre25-Jun-15 14:14
professionalSascha Lefèvre25-Jun-15 14:14 
GeneralRe: C# code is only inserting a few records. Pin
Norris Chappell25-Jun-15 15:49
Norris Chappell25-Jun-15 15:49 
GeneralRe: C# code is only inserting a few records. Pin
PIEBALDconsult29-Jun-15 15:36
mvePIEBALDconsult29-Jun-15 15:36 
QuestionFile permissions when writing a file to FTP server using FtpWebRequest Pin
DanDan_T25-Jun-15 6:47
DanDan_T25-Jun-15 6:47 
AnswerRe: File permissions when writing a file to FTP server using FtpWebRequest Pin
Pete O'Hanlon25-Jun-15 9:28
mvePete O'Hanlon25-Jun-15 9:28 
You can't do it directly via the .NET FTP command. What you will have to do is work around this using something like this:
C#
[DllImport("wininet.dll")]
private extern static IntPtr InternetConnect(IntPtr internet, string host, short port, string username, string password, int service, int flags, IntPtr context);

[DllImport("wininet.dll")]
private extern static bool FtpCommand(IntPtr connect, bool expectResponse, int flags, string command, IntPtr context, out IntPtr ftpCommand);

[DllImport("wininet.dll")]
private extern static bool IntPtr InternetCloseHandle(IntPtr connect);

public static bool ChangePermission(string uri, string folder, string userName, string password)
  {
   IntPtr context = IntPtr.Zero;
   IntPtr ftpCommand = IntPtr.Zero;
   IntPtr open = InternetOpen("Portal", 1, null, null, 0x10000000);
   IntPtr connected = InternetConnect(open, uri, 21, userName, password, 1, 0x08000000, context);
   if (!FtpCommand(connected, false, 0x00000001, "CWD " + folder, context, out ftpCommand)) return false;
   if (!FtpCommand(connected, false, 0x00000001, "SITE CHMOD 775 theFile.txt", context, out ftpCommand)) return false;
   bool connectedclose = InternetCloseHandle(connected);
   bool openclose = InternetCloseHandle(open);
   return (connectedclose && openclose)
}
Note that I've just typed this out into the editor here. There may be a minor syntax error or two, but this should give you the idea.
GeneralRe: File permissions when writing a file to FTP server using FtpWebRequest Pin
DanDan_T25-Jun-15 12:07
DanDan_T25-Jun-15 12:07 
GeneralRe: File permissions when writing a file to FTP server using FtpWebRequest Pin
DanDan_T26-Jun-15 5:29
DanDan_T26-Jun-15 5:29 
AnswerRe: File permissions when writing a file to FTP server using FtpWebRequest Pin
Brisingr Aerowing25-Jun-15 19:48
professionalBrisingr Aerowing25-Jun-15 19:48 
QuestionHOw to solve input string was not in the correct format Pin
Siao Da25-Jun-15 4:50
Siao Da25-Jun-15 4:50 
AnswerRe: HOw to solve input string was not in the correct format Pin
Pete O'Hanlon25-Jun-15 4:58
mvePete O'Hanlon25-Jun-15 4:58 
GeneralRe: HOw to solve input string was not in the correct format Pin
Siao Da25-Jun-15 5:08
Siao Da25-Jun-15 5:08 
GeneralRe: HOw to solve input string was not in the correct format Pin
CHill6025-Jun-15 6:04
mveCHill6025-Jun-15 6:04 
QuestionDoes anyone experienced in the text-to-speech in C# WinForm ? Pin
goldsoft24-Jun-15 23:51
goldsoft24-Jun-15 23:51 
AnswerRe: Does anyone experienced in the text-to-speech in C# WinForm ? Pin
Mycroft Holmes24-Jun-15 23:56
professionalMycroft Holmes24-Jun-15 23:56 
AnswerRe: Does anyone experienced in the text-to-speech in C# WinForm ? Pin
Eddy Vluggen25-Jun-15 9:48
professionalEddy Vluggen25-Jun-15 9:48 
QuestionWhat to do if I want to return rows from different tables in ASP.NET WebService Pin
jasonalien24-Jun-15 22:41
jasonalien24-Jun-15 22:41 
AnswerRe: What to do if I want to return rows from different tables in ASP.NET WebService Pin
F-ES Sitecore25-Jun-15 0:02
professionalF-ES Sitecore25-Jun-15 0:02 
GeneralRe: What to do if I want to return rows from different tables in ASP.NET WebService Pin
jasonalien25-Jun-15 0:14
jasonalien25-Jun-15 0:14 
GeneralRe: What to do if I want to return rows from different tables in ASP.NET WebService Pin
F-ES Sitecore25-Jun-15 0:23
professionalF-ES Sitecore25-Jun-15 0:23 
Questionstoring result into byte[] Pin
Member 1171394224-Jun-15 21:04
Member 1171394224-Jun-15 21:04 
AnswerRe: storing result into byte[] Pin
Pete O'Hanlon24-Jun-15 23:50
mvePete O'Hanlon24-Jun-15 23:50 
GeneralRe: storing result into byte[] Pin
Member 1171394227-Jun-15 0:39
Member 1171394227-Jun-15 0:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.