15,741,083 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View Javascript questions
View C++ questions
View Python questions
View Java questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Kuthuparakkal (Top 200 by date)
Kuthuparakkal
11-Feb-19 13:07pm
View
Thank you ML
Kuthuparakkal
25-Jan-19 14:53pm
View
Microsoft.Office.Interop.Word.Application winword = new Microsoft.Office.Interop.Word.Application();
Document document = winword.Documents.Open(@".docPath");
//Save the document
object filename = @"c:\temp1.docx";
document.SaveAs2(ref filename);
document.Close(ref missing, ref missing, ref missing);
document = null;
winword.Quit(ref missing, ref missing, ref missing);
winword = null;
Kuthuparakkal
13-Oct-16 6:27am
View
You cannot delete both in 1 SQL Statement. You need to separate it out (ie 2 SQL Stmnt. If this is PK-FK style, then set Cascade on Delete so that if you delete from primary then it will be deleted from FK table...
Kuthuparakkal
1-Aug-16 0:19am
View
This may not be the very first error, please scan log again. I believe it's permission issue because if the pkg runs in VS it runs under your credentials, and when it runs under SQL Agent it runs under the credential used by "SQL Server Services"
Kuthuparakkal
30-Jun-16 7:16am
View
We may need a database priest to conduct this marriage....
Kuthuparakkal
13-Nov-15 13:34pm
View
You could use SQL to fetch the data starting from 19th Position. Create Excel File Connection, Excel Data Source and use SQL like below and put it in destination table like any other SSIS package.
SELECT [YourColumnName1], [YourColumnName2], ....
FROM [ExcelSheetName$A19:IV]
Kuthuparakkal
13-Nov-15 6:13am
View
This is the normal operation, Excel is read until the last row every time, you do not need any specific logic. Just go ahead with SSIS package creation.
A conditional Split can be inserted to spit our blank rows - this may occur when the contents of last few rows are emptied.
If you are looking for more sophisticated automation then look at my article: http://www.codeproject.com/Articles/368530/Dynamic-Excel-file-loading-with-SSIS
Kuthuparakkal
12-Nov-15 8:35am
View
Okay. End of Cell means row or columns ? Are the number of columns fixed ?
Kuthuparakkal
10-Nov-15 8:56am
View
Read Excel with what ? C# , SSIS , etc ?
Kuthuparakkal
30-Oct-15 15:47pm
View
If it worked, mark as answer!
Kuthuparakkal
30-Oct-15 8:51am
View
[Dim Data Period] may not be your dim name - change it (commonsense !? )
Kuthuparakkal
8-Jul-15 13:53pm
View
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TestAccessDB
{
class Program
{
static void Main(string[] args)
{
Run();
}
private static void Run()
{
//Using JET.OLEDB :
System.Data.OleDb.OleDbConnection AccessConn = new
System.Data.OleDb.OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Data\Matrix\Info.accdb");
//Using ACE.OLEDB :
//System.Data.OleDb.OleDbConnection AccessConn = new
//System.Data.OleDb.OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Test Files\\db1.mdb")
AccessConn.Open();
//New table, using SELECT INTO
System.Data.OleDb.OleDbCommand AccessCommand = new System.Data.OleDb.OleDbCommand("SELECT * INTO [Accounts] FROM [Accounts] IN '' [ODBC;Driver={SQL Server};Server=(local);Database=Test;Trusted_Connection=yes];", AccessConn);
//Existing table, using INSERT INTO
//Dim AccessCommand As New System.Data.OleDb.OleDbCommand("INSERT INTO [ORDERS] SELECT * FROM [Orders] IN '' //[ODBC;Driver={SQL Server};Server=(local);Database=Northwind;Trusted_Connection=yes];", AccessConn)
AccessCommand.ExecuteNonQuery();
AccessConn.Close();
}
}
}
Kuthuparakkal
5-Jul-15 15:13pm
View
Split the string into array (based on spaces), then use LINQ first and last like:
stringArray.First();
stringArray.Last();
Kuthuparakkal
30-Jun-15 11:28am
View
Is this a question ?
Kuthuparakkal
18-Jun-15 5:28am
View
Modified my answer, review!
Kuthuparakkal
26-May-15 11:50am
View
q = "SELECT * FROM Employees WHERE [First Name(s)] = " + "'*" + textBox1.Text.Trim() + "*'";
Kuthuparakkal
20-May-15 21:27pm
View
Initiate & commit the transactions within the for loop.
.....
for(....
{
Int64 CurrentOrderIdInArray = Convert.ToInt64(OrderIds.GetValue(i).ToString());
UpdateTransaction = Conn.BeginTransaction();
sqlCmdTakeOwnership.Transaction = UpdateTransaction;
....
UpdateTransaction.Commit();
}
OrderIds = null;
.....
.....
OR Use : TransactionScope
using (TransactionScope scope = new TransactionScope())
{
for(....)
{
}
scope.Complete();
}
Kuthuparakkal
18-May-15 10:15am
View
Fix a task for you; start coding towards it; this way you may get started. For example: Try to get some data stored in a database; load them into DataTable and do manipulation of the data and try to display your data the way you want.
Also go through Articles here in CodeProject of a topic of your interest
Kuthuparakkal
18-May-15 8:20am
View
You may try to cut-short your code as :
TimeSpan diff = endTime.Subtract(startTime);
result = ((int)diff.TotalHours).ToString() + ":" + (diff.Minutes).ToString();
Kuthuparakkal
10-May-15 22:17pm
View
Very nice question - keep moving!
Kuthuparakkal
13-Apr-15 17:35pm
View
This is not the way you think it is.
Kuthuparakkal
11-Mar-15 12:07pm
View
Have you heard of DBML : take a look - https://msdn.microsoft.com/en-us/library/bb386927(v=vs.110).aspx
Kuthuparakkal
11-Mar-15 8:31am
View
English has gotten worsen this much since....
Kuthuparakkal
8-Mar-15 14:25pm
View
check if Database.t already exists or not ?
Kuthuparakkal
5-Mar-15 9:43am
View
you are welcome!
Kuthuparakkal
5-Mar-15 8:51am
View
I posted a solution, please have a look.
Kuthuparakkal
5-Mar-15 7:55am
View
I didnt quite understand the objective. Could you explain it in simple English rather than pseudo code ?
Kuthuparakkal
2-Mar-15 16:15pm
View
Create a WebService Proxy, https://msdn.microsoft.com/en-us/library/bbs97dkt%28v=vs.90%29.aspx
Kuthuparakkal
2-Mar-15 8:45am
View
Take a look : http://www.codeproject.com/Articles/41869/Custom-Drawn-Scrollbar
Kuthuparakkal
28-Feb-15 21:23pm
View
Unclear
Kuthuparakkal
24-Feb-15 17:41pm
View
Unclear!
Kuthuparakkal
23-Feb-15 6:46am
View
Some webapp checks whats the link before post to ensure max security
Kuthuparakkal
23-Feb-15 6:45am
View
Assumed no-gaps. In fact you need to create a table variable (SI, Id) and iterate it and pick Id
Kuthuparakkal
22-Feb-15 20:48pm
View
Create variable and determine local path, then use this variable to build exact path and apply!
Kuthuparakkal
22-Feb-15 20:45pm
View
ALTER TABLE is for existing table, not for the tables to be created in future.
Kuthuparakkal
22-Feb-15 20:43pm
View
Explain whats there in the bind method
Kuthuparakkal
22-Feb-15 20:39pm
View
Great answer! my 5+
Kuthuparakkal
22-Feb-15 20:37pm
View
Everything is possible, only thing that makes it possible is your approach.
Kuthuparakkal
22-Feb-15 20:35pm
View
Take a look here : http://blogs.msdn.com/b/text/archive/2006/07/10/font-families-and-friendly-names.aspx
Kuthuparakkal
22-Feb-15 20:06pm
View
Try: http://support.microsoft.com/kb/308260
Kuthuparakkal
22-Feb-15 20:03pm
View
Use LEFT OUTER JOIN
http://docs.oracle.com/javadb/10.8.1.2/ref/rrefsqlj18922.html
Kuthuparakkal
22-Feb-15 19:57pm
View
May be you are missing a linefeed between data.
Kuthuparakkal
22-Feb-15 19:43pm
View
Try something like this: https://code.djangoproject.com/wiki/Tutorials
Kuthuparakkal
22-Feb-15 19:39pm
View
Please improve question, its not clear to attempt for a solution
Kuthuparakkal
22-Feb-15 18:42pm
View
Buy a GSM modem, and send it.
Or
Buy SMS Pack from SMS Provider and they may have APIs to consume in your code
Kuthuparakkal
22-Feb-15 17:48pm
View
Check my answer
Kuthuparakkal
22-Feb-15 17:35pm
View
Good one. my 5+
Kuthuparakkal
22-Feb-15 17:34pm
View
my 5+
Kuthuparakkal
22-Feb-15 17:31pm
View
Look at Irrlicht - it's open source. http://irrlicht.sourceforge.net/
Also Box2D is another 2D Open Source Physics Engine. http://box2d.org/
You will get ideas how to port it. Both the libraries are much used.
Kuthuparakkal
22-Feb-15 17:25pm
View
Was looking for high rated questions and answers... :)
Kuthuparakkal
22-Feb-15 17:21pm
View
my 5+
Kuthuparakkal
22-Feb-15 17:21pm
View
good one!
Kuthuparakkal
22-Feb-15 17:19pm
View
my 5+
Kuthuparakkal
22-Feb-15 17:18pm
View
Website counterfeiting :)
Kuthuparakkal
22-Feb-15 17:16pm
View
Yes, I do agree SA! Why should we bother.
Kuthuparakkal
22-Feb-15 17:15pm
View
Unclear
Kuthuparakkal
22-Feb-15 17:14pm
View
Good one!
Kuthuparakkal
22-Feb-15 17:14pm
View
my 5+
Kuthuparakkal
22-Feb-15 17:12pm
View
Best possible answer
Kuthuparakkal
22-Feb-15 17:00pm
View
Posted a solution, try it
Kuthuparakkal
22-Feb-15 16:40pm
View
Try this:
public static HttpWebResponse POST(string postData, string url, string referer, CookieContainer cookie)
{
try
{
byte[] byteArray = Encoding.UTF8.GetBytes(postData);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
request.Method = "POST";
request.KeepAlive = true;
request.AllowAutoRedirect = false;
request.Accept = "*/*";
request.ContentType = "application/x-www-form-urlencoded";
request.CookieContainer = cookie;
if (!string.IsNullOrEmpty(referer))
request.Referer = referer;
request.ContentLength = byteArray.Length;
request.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5";
// request.Proxy = null;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
return (HttpWebResponse)request.GetResponse();
}
catch
{
return (HttpWebResponse)null;
}
}
Kuthuparakkal
22-Feb-15 16:39pm
View
Try this:
public static HttpWebResponse POST(string postData, string url, string referer, CookieContainer cookie)
{
try
{
byte[] byteArray = Encoding.UTF8.GetBytes(postData);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
request.Method = "POST";
request.KeepAlive = true;
request.AllowAutoRedirect = false;
request.Accept = "*/*";
request.ContentType = "application/x-www-form-urlencoded";
request.CookieContainer = cookie;
if (!string.IsNullOrEmpty(referer))
request.Referer = referer;
request.ContentLength = byteArray.Length;
request.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5";
// request.Proxy = null;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
return (HttpWebResponse)request.GetResponse();
}
catch
{
return (HttpWebResponse)null;
}
}
Kuthuparakkal
22-Feb-15 16:23pm
View
I dont understand, can you make it clear ?
Kuthuparakkal
22-Feb-15 16:21pm
View
var firstNotSecond = list1.Except(list2).ToList();
var secondNotFirst = list2.Except(list1).ToList();
Kuthuparakkal
22-Feb-15 16:15pm
View
https://msdn.microsoft.com/en-us/library/ms162575.aspx
Kuthuparakkal
22-Feb-15 13:42pm
View
Try this: http://www.vbforums.com/showthread.php?538218-RESET-running-total-after-each-page
Kuthuparakkal
22-Feb-15 13:38pm
View
Set a variable say boolean var FuncRunnig = false
Set the var value appropriately, check this var before calling the function
Kuthuparakkal
22-Feb-15 13:36pm
View
Please check my solution
Kuthuparakkal
22-Feb-15 13:36pm
View
Pls check my answer
Kuthuparakkal
22-Feb-15 9:07am
View
Streaming means get by chunks, so whats the issue ?
Kuthuparakkal
22-Feb-15 9:06am
View
What have you tried so far ? Is it SQL or VB.NET ?
Kuthuparakkal
22-Feb-15 9:06am
View
my 5+
Kuthuparakkal
21-Feb-15 16:13pm
View
Bad design
Kuthuparakkal
21-Feb-15 16:09pm
View
I dont understand, explain more
Kuthuparakkal
21-Feb-15 16:06pm
View
not an answer
Kuthuparakkal
21-Feb-15 16:06pm
View
+5
Kuthuparakkal
21-Feb-15 16:04pm
View
+5
Kuthuparakkal
21-Feb-15 16:04pm
View
Ask Microsoft
Kuthuparakkal
21-Feb-15 16:02pm
View
My 5+
Kuthuparakkal
21-Feb-15 16:02pm
View
:)
Kuthuparakkal
21-Feb-15 16:01pm
View
:(
Kuthuparakkal
21-Feb-15 16:00pm
View
Great!
Kuthuparakkal
21-Feb-15 15:57pm
View
Not an answer..
Kuthuparakkal
21-Feb-15 15:55pm
View
Self goal ?
Kuthuparakkal
21-Feb-15 15:54pm
View
SA 5*, my +5
Kuthuparakkal
21-Feb-15 15:53pm
View
+5
Kuthuparakkal
21-Feb-15 15:49pm
View
I dont understand
Kuthuparakkal
21-Feb-15 15:48pm
View
Need more info
Kuthuparakkal
21-Feb-15 15:46pm
View
Expectation reduces joy!
Kuthuparakkal
21-Feb-15 15:44pm
View
Please take a look : http://support.microsoft.com/kb/820122
Kuthuparakkal
21-Feb-15 15:41pm
View
:)
Kuthuparakkal
21-Feb-15 15:37pm
View
It has to be done in a composite way. Like setting some identifier (like some html css class) from code behind and you client side scripting like (jscript) to identify those cells/rows and toggle color of the row/cell at regular intervals
Kuthuparakkal
21-Feb-15 15:32pm
View
Is that GET or POST ? Normally Query String redirects are GET. Open the WebSite and look at its html, you would see - method="post" - in the section where you have a form tag. If it's POST then you need to really make POST request rather than creating a query string.
https://msdn.microsoft.com/en-us/library/debx8sh9%28v=vs.110%29.aspx
Kuthuparakkal
21-Feb-15 11:40am
View
Great! +5
Kuthuparakkal
21-Feb-15 11:39am
View
+5
Kuthuparakkal
21-Feb-15 11:37am
View
Create Methods like
void CW(string s)
{
Console.WriteLine(s);
}
Kuthuparakkal
21-Feb-15 11:35am
View
Pls explain more
Kuthuparakkal
21-Feb-15 11:34am
View
Well said +5
Kuthuparakkal
21-Feb-15 11:32am
View
???
Kuthuparakkal
20-Feb-15 6:28am
View
You're welcome!
Kuthuparakkal
20-Feb-15 0:14am
View
PropertySet propSet = new PropertySet(BasePropertySet.IdOnly, ItemSchema.Subject, EmailMessageSchema.IsRead);
EmailMessage mail = EmailMessage.Bind(service, itemId, propSet);
Kuthuparakkal
20-Feb-15 0:12am
View
EmailMessage
Kuthuparakkal
19-Feb-15 23:53pm
View
I have posted an answer, please check
Kuthuparakkal
19-Feb-15 12:57pm
View
What are you using ? ExchangeWebAPI or what ?
Kuthuparakkal
19-Feb-15 12:56pm
View
select roll_no, ([16-02-2015] + [17-02-2015] + [18-02-2015]) as Total
from yourTable
Kuthuparakkal
19-Feb-15 12:52pm
View
What have you tried so far ? Whats the change you face ?
Kuthuparakkal
19-Feb-15 9:42am
View
Add an Identity Column (1,1) to your table, say ID
Now you order by ID check NULLS and update. I may post a solution later
Kuthuparakkal
19-Feb-15 9:38am
View
Add another loop to iterate cVowels and compare each character against sSentence[o]
Kuthuparakkal
19-Feb-15 9:36am
View
Unclear
Kuthuparakkal
18-Feb-15 10:45am
View
Look at IIS Permissions
Kuthuparakkal
18-Feb-15 10:44am
View
Homework
Kuthuparakkal
18-Feb-15 10:43am
View
lOOK AT THIS: http://stackoverflow.com/questions/12068154/on-the-fly-search-algorithm-in-listbox
Kuthuparakkal
17-Feb-15 23:12pm
View
private void cmdSave_Click(object sender, EventArgs e)
{
try
{
//Read Image Bytes into a byte array
byte[] imageData = ReadFile(txtImagePath.Text);
//Initialize SQL Server Connection
SqlConnection CN = new SqlConnection(txtConnectionString.Text);
//Set insert query
string qry = "insert into ImagesStore (OriginalPath,ImageData) _
values(@OriginalPath, @ImageData)";
//Initialize SqlCommand object for insert.
SqlCommand SqlCom = new SqlCommand(qry, CN);
//We are passing Original Image Path and
//Image byte data as sql parameters.
SqlCom.Parameters.Add(new SqlParameter("@OriginalPath",
(object)txtImagePath.Text));
SqlCom.Parameters.Add(new SqlParameter("@ImageData",
(object)imageData));
//Open connection and execute insert query.
CN.Open();
SqlCom.ExecuteNonQuery();
CN.Close();
//Close form and return to list or images.
this.Close();
}
Kuthuparakkal
17-Feb-15 23:01pm
View
Dangerous. Have a look:
https://msdn.microsoft.com/en-us/magazine/hh580736.aspx
Kuthuparakkal
17-Feb-15 22:50pm
View
You need to set EnableSsl property to true.
Kuthuparakkal
16-Feb-15 11:40am
View
Have you looked at : http://www.embarcadero.com/products/rad-studio/ios-development
Kuthuparakkal
16-Feb-15 11:26am
View
It may not be a picture.
Kuthuparakkal
16-Feb-15 11:21am
View
Improve Question, Define the problem, What have you tried to address the problem ? Whats the real challenge ?
Kuthuparakkal
16-Feb-15 11:20am
View
Unclear
Kuthuparakkal
16-Feb-15 11:19am
View
Homework ?
Kuthuparakkal
16-Feb-15 11:12am
View
Self goal.
Kuthuparakkal
16-Feb-15 10:46am
View
Have you looked at Replication ?
https://msdn.microsoft.com/en-us/library/ms146892.aspx
Kuthuparakkal
16-Feb-15 10:36am
View
Thank you
Kuthuparakkal
16-Feb-15 8:38am
View
Done!
Kuthuparakkal
15-Feb-15 18:23pm
View
Replace Inner SELECT UNION with your table name.
SELECT
[QGroup], SUM([values]) AS [sum-value-quarterly]
FROM
(
SELECT *, CEILING([counter] /3.0) AS [QGroup]
FROM
(
SELECT 1 AS [counter],10 AS [values]
UNION
SELECT 2 AS [counter],14 AS [values]
UNION
SELECT 3 AS [counter],16 AS [values]
UNION
SELECT 4 AS [counter],20 AS [values]
UNION
SELECT 5 AS [counter],30 AS [values]
UNION
SELECT 6 AS [counter],50 AS [values]
UNION
SELECT 7 AS [counter],25 AS [values]
UNION
SELECT 8 AS [counter],35 AS [values]
UNION
SELECT 9 AS [counter],10 AS [values]
UNION
SELECT 10 AS [counter],15 AS [values]
UNION
SELECT 11 AS [counter],25 AS [values]
)AS X
)AS Y
GROUP BY [QGroup]
ORDER BY [QGroup]
Kuthuparakkal
15-Feb-15 11:14am
View
Are you talking about programmatic GET/POST like using HttpWebRequest ?
Kuthuparakkal
15-Feb-15 10:19am
View
Add more details
Kuthuparakkal
15-Feb-15 10:17am
View
Depends!
Kuthuparakkal
15-Feb-15 10:15am
View
SQL is capable of handling LINQ nowadays (2025 Feb 15)!
Kuthuparakkal
15-Feb-15 10:13am
View
Please elaborate
Kuthuparakkal
15-Feb-15 10:11am
View
Use Joins
Kuthuparakkal
15-Feb-15 10:09am
View
Dim productImageByte As Byte() = TryCast(dr(16), Byte())
If productImageByte IsNot Nothing Then
Using productImageStream As Stream = New System.IO.MemoryStream(productImageByte)
PictureBox1.Image = Image.FromStream(productImageStream)
End Using
End If
Kuthuparakkal
15-Feb-15 10:06am
View
http://support.microsoft.com/kb/2468871
http://support.microsoft.com/kb/2183292
Kuthuparakkal
15-Feb-15 8:50am
View
Try:
http://www.codeproject.com/Articles/20420/How-To-Send-and-Receive-SMS-using-GSM-Modem
Kuthuparakkal
15-Feb-15 8:41am
View
What is the column data type in mysql table ?
Kuthuparakkal
15-Feb-15 8:39am
View
package com.test;
import java.util.Properties;
import javax.mail.BodyPart;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import org.junit.Test;
public class EmailService {
@Test
public void test(){
Properties props = System.getProperties();
props.put("mail.smtp.starttls.enable", true); // added this line
props.put("mail.smtp.host", "smtp.gmail.com");
props.put("mail.smtp.user", "username");
props.put("mail.smtp.password", "password");
props.put("mail.smtp.port", "587");
props.put("mail.smtp.auth", true);
Session session = Session.getInstance(props,null);
MimeMessage message = new MimeMessage(session);
System.out.println("Port: "+session.getProperty("mail.smtp.port"));
// Create the email addresses involved
try {
InternetAddress from = new InternetAddress("username");
message.setSubject("Yes we can");
message.setFrom(from);
message.addRecipients(Message.RecipientType.TO, InternetAddress.parse("receivermail"));
// Create a multi-part to combine the parts
Multipart multipart = new MimeMultipart("alternative");
// Create your text message part
BodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setText("some text to send");
// Add the text part to the multipart
multipart.addBodyPart(messageBodyPart);
// Create the html part
messageBodyPart = new MimeBodyPart();
String htmlMessage = "Our html text";
messageBodyPart.setContent(htmlMessage, "text/html");
// Add html part to multi part
multipart.addBodyPart(messageBodyPart);
// Associate multi-part with message
message.setContent(multipart);
// Send message
Transport transport = session.getTransport("smtp");
transport.connect("smtp.gmail.com", "username", "password");
System.out.println("Transport: "+transport.toString());
transport.sendMessage(message, message.getAllRecipients());
} catch (AddressException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Source: StackOverFlow
Kuthuparakkal
14-Feb-15 21:43pm
View
DATEDIFF(SS, [Start-Time], [End-Time])
Kuthuparakkal
14-Feb-15 21:41pm
View
Please detail
Kuthuparakkal
14-Feb-15 21:40pm
View
Pls do homework at home!
Kuthuparakkal
13-Feb-15 7:53am
View
Why cant we add a checkbox to tree nodes ?
Kuthuparakkal
13-Feb-15 7:52am
View
If you are not interested to go that deep like File Allocation level, then you may create a windows service and that spawns WMI events (for file access) and deny access based on your criteria
Kuthuparakkal
13-Feb-15 7:50am
View
Need more info. How do you minimize string ?
Kuthuparakkal
9-Feb-15 12:38pm
View
Follow: http://www.csharptutorial.in/37/csharp-net-how-to-consume-a-web-service-in-csharp-net-visual-studio-2010
Kuthuparakkal
9-Feb-15 11:19am
View
Use reflection and loop through properties (recieved), get value and if you see the same property in your object (objRec_Emp) and assign the value. Is this you meant ?
Kuthuparakkal
9-Feb-15 11:12am
View
What's the source of that WDSL, it should be a url. So copy the Url and create a service reference and paste the url. VS would create a class (proxy) for it. Now consume the class like anyother class
Kuthuparakkal
9-Feb-15 11:07am
View
Good idea throwing readers into confusion. Explain more.
Kuthuparakkal
9-Feb-15 11:05am
View
If it's that small; why don't you attempt to write it in C# ?
Kuthuparakkal
8-Feb-15 15:08pm
View
Create Property (get;set) for txtName text and txtLogin text. Refer to this properties while calling the thread rather than referring to form controls.
Set the properties in the button click (submit) event.
Kuthuparakkal
8-Feb-15 15:08pm
View
Deleted
Create Property (get;set) for txtName text and txtLogin text. Refer to this properties while calling the thread rather than referring to form controls.
Set the properties in the button click (submit) event.
Kuthuparakkal
6-Feb-15 9:42am
View
Not clear!
Kuthuparakkal
27-Jan-15 16:33pm
View
Reason for my vote of 1 \n Meaningless!!!
Purpose ?
Explanation ?
Copy and Paste ?
Where is txtDB, txtServer, txtInsert, txtSelect, txtUpdate, txtRunProcParam1, txtRunProcParam2, dgvSelect ?
Kuthuparakkal
26-Nov-14 15:41pm
View
"At once" and "Sequentially" never go hand-in-hand. Please explain more
Kuthuparakkal
11-Nov-14 14:11pm
View
it's working code; also you may try to see if PropertyInfo is null before getting the value. Thats the difference. Splitting into many would be easy to debug.
Kuthuparakkal
15-Jul-14 15:57pm
View
Read from the beginning, its not my code... Having eyes doesn't mean....
Kuthuparakkal
12-Aug-13 9:52am
View
No probs :)
Kuthuparakkal
12-Aug-13 8:38am
View
Does "Local System" have permission to access your files/folders ?
Kuthuparakkal
12-Aug-13 7:39am
View
Please check the account under service is running has permission to access the file to be zipped
Kuthuparakkal
8-Aug-13 4:04am
View
Well done!
Kuthuparakkal
8-Aug-13 4:03am
View
Unclear ? What are you trying to do ?
Kuthuparakkal
8-Aug-13 3:59am
View
what formula ? explain more
Kuthuparakkal
8-Aug-13 3:58am
View
Post code sample from where you try to fetch file/its contents...
Also is this Windows app or console app ?
Kuthuparakkal
8-Aug-13 3:16am
View
You're most welcome!
Kuthuparakkal
8-Aug-13 3:11am
View
Thanks Manas!
Kuthuparakkal
8-Aug-13 3:11am
View
No Probs!
Kuthuparakkal
8-Aug-13 3:08am
View
See the solution posted....
Kuthuparakkal
8-Aug-13 1:52am
View
Repost
Kuthuparakkal
8-Aug-13 1:43am
View
not clear enough to answer, what's 50 GB a database size limitation or file size limitation ?
Kuthuparakkal
8-Aug-13 1:41am
View
Post parent class(base) definition
Kuthuparakkal
8-Aug-13 1:40am
View
Post sample output
Kuthuparakkal
7-Aug-13 13:04pm
View
that means you've everything in your table; dont need to reinsert... delete 1 or two records and try
Kuthuparakkal
7-Aug-13 6:01am
View
Thanks Ridoy!!!
Kuthuparakkal
7-Aug-13 5:11am
View
Deleted
Please post sample output
Kuthuparakkal
7-Aug-13 4:34am
View
Duplicate
Kuthuparakkal
6-Aug-13 21:39pm
View
Thanks!
Kuthuparakkal
5-Aug-13 23:56pm
View
What hae you tried so far ? Explain more
Kuthuparakkal
5-Aug-13 23:34pm
View
Yes 5+!
Kuthuparakkal
5-Aug-13 23:32pm
View
unclear
Kuthuparakkal
5-Aug-13 7:04am
View
Updated soln, please check!
Kuthuparakkal
4-Aug-13 13:27pm
View
Very well, glad to know you were lookin for this!!!
Kuthuparakkal
4-Aug-13 5:21am
View
Not clear
Kuthuparakkal
4-Aug-13 4:01am
View
What've u tried so far ? Also explain the question little more readable
Kuthuparakkal
4-Aug-13 3:46am
View
Thanks Ridoy, appreciated!
Kuthuparakkal
4-Aug-13 3:45am
View
If it helped pls maark answer.. thanks!
Kuthuparakkal
4-Aug-13 3:23am
View
I dont understand yr question
Kuthuparakkal
4-Aug-13 3:20am
View
Datatable/Rows/Columns etc have zero based indices, 0 first row, 1 second row etc.. In your case, there wasnt any second row so it fails there..
Kuthuparakkal
2-Aug-13 23:41pm
View
unclear
Kuthuparakkal
2-Aug-13 2:07am
View
Did you install MySQL.Net Connector ?
If not install it from http://dev.mysql.com/downloads/connector/net
Kuthuparakkal
29-Jul-13 8:49am
View
Dim dt3 As New DataTable
' Create four typed columns in the DataTable.
dt3.Columns.Add("ADminNo", GetType(String))
dt3.Columns.Add("PaperNo", GetType(Int32))
dt3.Rows.Add("111411H", "3")
dt3.Rows.Add("111411H", "18")
dt3.Rows.Add("172828z", "3")
dt3.Rows.Add("172828z", "18")
dt3.Rows.Add("111380Y", "93")
dt3.Rows.Add("111380S", "10")
Dim dt As New DataTable
' Create four typed columns in the DataTable.
dt.Columns.Add("ConflictingPaper", GetType(String))
dt.Columns.Add("Numberofstudents", GetType(String))
dt.Columns.Add("AdminNo", GetType(String))
Dim query1 = (From _a In dt3
Group Convert.ToString(_a.Field(Of Int32)("PaperNo"))
By AdminNo = _a.Field(Of String)("AdminNo")
Into Group
Select dt.LoadDataRow(New Object() {String.Join(":", Group.ToArray()), Group.Count(), AdminNo}, False)
).ToList().Count()
Dim gdv As New DataGridView
gdv.AutoGenerateColumns = True
gdv.DataSource = dt
Me.Control.Add(gdv)
Kuthuparakkal
26-Jul-13 8:34am
View
how do you store colon separated value inside int32 datatype it's utter wrong...
When you put break point(the original code by me) and point to dt with your mouse when break point turns yellow, you see many options like "Data Table Visualizer", "Text Visualizer", "XML .." etc... Select Data Table Visualizer to see what's there in the "dt" variable
Ref: http://msdn.microsoft.com/en-us/library/zayyhzts.aspx
Kuthuparakkal
26-Jul-13 3:31am
View
Put a break point on "DataGridView3.AutoGenerateColumns = True" and view what's there in dt...
Kuthuparakkal
26-Jul-13 3:14am
View
_a is alias for dt3 in Linq query. I used Linq for solving this... You may look up MSDN for Linq(Language Integrated Query)
Thanks,
Kuthuparakkal
Kuthuparakkal
26-Jul-13 2:50am
View
Modified soln, please try!
Kuthuparakkal
26-Jul-13 0:42am
View
Use IDENTITY, see my soln updated!
Kuthuparakkal
25-Jul-13 10:50am
View
Check the spelling for "Description" in your datatable against the Linq written
Kuthuparakkal
25-Jul-13 9:32am
View
What's this "letters[0].ToString()" ? Replace this with some letter may reveal the issue
Kuthuparakkal
25-Jul-13 9:17am
View
See my solution...
Thanks,
Kuthuparakkal
Kuthuparakkal
25-Jul-13 9:16am
View
I have been using the same approach for the last couple years, it works.. Something wrong with your pkg or settings...
Kuthuparakkal
25-Jul-13 9:15am
View
Did you give proper password once you change to "EncryptSensitiveWithUserKey" ?
Also, be sure if you are using 32bit execution mode when Excel(.xls or .xlsx) connection involved.
Kuthuparakkal
25-Jul-13 2:42am
View
Modified, please try now!
Kuthuparakkal
25-Jul-13 1:48am
View
You're welcome!!!
Show More