helpful linq to sql article
http://weblogs.asp.net/scottgu/archive/2007/07/11/linq-to-sql-part-4-updating-our-database.aspx
Achievement provides the only real pleasure in life
http://weblogs.asp.net/scottgu/archive/2007/07/11/linq-to-sql-part-4-updating-our-database.aspx
Posted by SF at 10:49 am 0 comments
found this helpful
http://visualstudiohacks.com/general/confessions-of-a-keyboard-junkie/
Posted by SF at 11:14 am 0 comments
String sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + RadUpload.UploadedFiles[0].FileName+";" +
"Extended Properties=Excel 8.0;";
OleDbConnection objConn = new OleDbConnection(sConnectionString);
objConn.Open();
OleDbCommand cmdSelectAdditions = new OleDbCommand("SELECT * FROM [Sheet1$]", objConn);
OleDbDataAdapter AdapterForAdditions = new OleDbDataAdapter();
AdapterForAdditions.SelectCommand = cmdSelectAdditions;
DataSet dsAdditions = new DataSet();
AdapterForAdditions.Fill(dsAdditions);
objConn.Close();
Posted by SF at 4:16 pm 0 comments
this article helped me, hope it helps you too!
http://www.4guysfromrolla.com/articles/030911-1.aspx
I need to parse HTML into the pdf, the implementation is:
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=Transactions.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Document document = new Document(PageSize.A1, 10f, 10f, 10f, 0f);
PdfWriter.GetInstance(document, Response.OutputStream);
// Open the Document for writing
document.Open();
string documentContent = string.Empty;
document.NewPage();
documentContent = "Confirmation" + "
" + body;
StringReader sr = new StringReader(documentContent);
foreach (object item in HTMLWorker.ParseToList(sr, null).ToList())
{
document.Add((IElement)item);
}
document.Close();
Response.Write(document);
Response.End();
Posted by SF at 2:18 pm 0 comments
found this article very helpful
http://support.microsoft.com/kb/306572/
I modified it a bit to work for me (I am using RadUpload to get the file):
// Create connection string variable. Modify the "Data Source"
// parameter as appropriate for your environment.
String sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + ruImporter.UploadedFiles[0].FileName+";" +
"Extended Properties=Excel 8.0;";
// Create connection object by using the preceding connection string.
OleDbConnection objConn = new OleDbConnection(sConnectionString);
// Open connection with the database.
objConn.Open();
// The code to follow uses a SQL SELECT command to display the data from the worksheet.
// Create new OleDbCommand to return data from worksheet.
OleDbCommand objCmdSelect = new OleDbCommand("SELECT * FROM [Sheet1$]", objConn);
// Create new OleDbDataAdapter that is used to build a DataSet
// based on the preceding SQL SELECT statement.
OleDbDataAdapter objAdapter1 = new OleDbDataAdapter();
// Pass the Select command to the adapter.
objAdapter1.SelectCommand = objCmdSelect;
// Create new DataSet to hold information from the worksheet.
DataSet objDataset1 = new DataSet();
// Fill the DataSet with the information from the worksheet.
objAdapter1.Fill(objDataset1);
// Clean up objects.
objConn.Close();
Posted by SF at 10:09 am 0 comments