16,021,181 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 C++ questions
View Visual Basic questions
View Javascript questions
View .NET 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 aksjustcool (Top 3 by date)
aksjustcool
13-Jul-15 8:38am
View
Suppose I have such 3 Script Number:
1001
1002
1003
On invoking each of them (One by one using foreach loop)we will land up on three respective different pages, but only the last page i.e. for script 1003 is seen.
I am unable to load the other two pages on webbrowser. Only the last page is being loaded. Is there any alternative or JavaScript Loadcomplete method which can help me around this?
aksjustcool
12-Jan-15 1:23am
View
Hi Jymmy097, thanx for your input will remember this. I have just updated my question. Kindly share your input for this Thanx
aksjustcool
19-Nov-14 11:49am
View
///app.config
<configuration>
<appsettings>
<add key="Connstr" value="SERVER=192.168.1.4;database=RenfroERP;uid=appdev;pwd=appdev">
<add key="Connstr2" value="Server=192.168.1.6\SQLExpress;database=EkatmERP;uid=EkatmSA;pwd=EkatmSA">
///databaseconn.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
namespace ExcelBeginner
{
class Query
{
public DataTable MyDataTable(string query, string Connstr)
{
try
{
DataTable dt = new DataTable();
SqlDataAdapter da = new SqlDataAdapter(query, Connstr);
da.Fill(dt);
return (dt);
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
}
}
////program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace BeginExcel
{
static class Program
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new RzExcel());
}
}
}
//// Excel.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Diagnostics;
using Excel = Microsoft.Office.Interop.Excel;
namespace BeginExcel
{
public partial class RzExcel : Form
{
public RzExcel()
{
InitializeComponent();
}
object misValue = System.Reflection.Missing.Value;
ExcelBeginner.Query objQuery = new ExcelBeginner.Query();
public void CreatExcelFromDB(string sqlquery, string Connstr, string FileName)
{
SqlDataAdapter DA = new SqlDataAdapter(sqlquery, Connstr);
DataSet DS = new DataSet();
DA.Fill(DS);
CreateExcel(DS, FileName);
}
public void CreatExcelFromDS(DataSet DS, string FileName)
{
CreateExcel(DS, FileName);
}
public DataSet ExcelToDT(string _Location)
{
DataSet ds = new DataSet();
var excelConnectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=Excel 8.0", _Location);
System.Data.OleDb.OleDbConnection connection = new System.Data.OleDb.OleDbConnection();
connection.ConnectionString = excelConnectionString;
DataTable sheets = GetSchemaTable(excelConnectionString);
foreach (DataRow r in sheets.Rows)
{
string query = "SELECT * FROM [" + r.ItemArray[0].ToString() + "]";
ds.Clear();
System.Data.OleDb.OleDbDataAdapter data = new System.Data.OleDb.OleDbDataAdapter(query, connection);
data.Fill(ds);
}
return ds;
}
private static void WriteArray(int rows, int columns, Excel.Worksheet worksheet)
{
var data = new object[rows, columns];
for (var row = 1; row <= rows; row++)
{
for (var column = 1; column <= columns; column++)
{
data[row - 1, column - 1] = "Test";
}
}
var startCell = (Excel.Range )worksheet.Cells[1, 1];
var endCell = (Excel.Range )worksheet.Cells[rows, columns];
var writeRange = worksheet.Range[startCell, endCell];
writeRange.Value2 = data;
}
static DataTa