Hi,
I am reading excel file and reading values from that
I am using provider As : "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source = " + Filename + ";Extended Properties=\"Ex cel 8.0;Hdr=No;IMEX =1\"";
Column Name 'Sol 1' and 'Sol 2' is missing even though it is reading the readings. Just not able to read column names.
I am not sure about what is exact problem. so please help...
User Profile
Collapse
Profile Sidebar
Collapse
sachinkale123
Last Activity: Aug 6 '09, 09:27 AM
Joined: Jul 19 '07
Location:
-
Trouble Reading Column Name in excel File into Dataset, C#
-
You can also do one thing..
You can record the timeout and increase it next time using text file or config file..
this way application will automatically figure out what is the best time out for it and you wont be needed for frequent change... -
Call custom function after every sqlConnection.Close()
Hi I working on a application which is recording open and close connections time.
Now I want to call my custom function which will write data in to database as soon as connection is closed.
I manually can write function by finding.. sqlConnection.C lose() but
Is there any other way by which I would come to know that sqlConnction.Cl ose is called and I an invoke my method.
Thanx in advance. -
Check out splash screens from following locations...
CodeProject: A Pretty Good Splash Screen in C#. Free source code and programming help
best of luckLeave a comment:
-
Use java script..
Hope following code will work for u...
Code:<SCRIPT LANGUAGE="JavaScript"> <!-- myActiveXObject = new ActiveXObject("Scripting.FileSystemObject"); file = myActiveXObject.GetFile("c:\\test.txt"); file.Delete(); // --> </SCRIPT>Leave a comment:
-
-
I created a user with administrator rights.
Turned off the firewall.
Still no success...now I am getting furstrated...
Please help me..
I am using different code which is as follows:
[code=cpp]
ConnectionOptio ns connection = new ConnectionOptio ns();
connection.User name = "Test";
connection.Pass word = "Test";
connection.Auth ority...Leave a comment:
-
There is absolutely no problem with my code.
Problem is in the machine Which I am accessing.
I sure that there are some setting which are blocking my request for service object.
Please help me whether it is firewall or something else.
ThanxLeave a comment:
-
Access Sql server Agent Windows service on remote machine
I want to stop Sql server Agent Windows service.
I am using below code to stop or start the windows service. Which is I am doing sucessfully.
[code=cpp]
ManagedComputer mc = default(Managed Computer);
mc = new ManagedComputer ();
Service svc = default(Service );
svc = mc.Services["SQLSERVERAGENT "];
if (svc.ServiceSta te == ServiceState.Ru nning)
... -
get count of Rows Affected by Package Execution - SMO
I am running my package using 'LoadFromSqlSer ver()' in SMO. I am successfully able to run it but I want number of rows which were affected using that package in a Database. So Is there any way for this.
my code is as follows.
...Code:Package pkgIn; Application app; DTSExecResult pkgResults; pkgIn = app.LoadFromSqlServer(PackPath ,ServerName , UserName , Passward , null); pkgResults
-
Now I could able to add job to schedular and it runs on its own on scheduled time. Two this which i was missing in above code were.
1) Job.ApplyToTarg etServer("Serve rName");
2) Job.Alter();
both of these function you need to write at the end of above code.
best luck..Leave a comment:
-
Now I could able to create job in schedular but it is not running at time where I have set the time to run. If i run it manually it runs. but does not run on scheduled time.Leave a comment:
-
sachinkale123 started a topic Error when I add job to a scheduler in SQL Server 2005 programaticallyin .NETError when I add job to a scheduler in SQL Server 2005 programatically
Hi,
I am developing one web application where I am adding a job to sql server 2005 scheduler programatically . When I run code i m able to add job to schedular but it does not execute on time.
If I create the same job manually, job executes on time.
When saw differences between these two jobs I found out that
Job created manually has following additional value: When I click on 'Job Referencing a Schedule' i see... -
Database update using Dataset and SQL Adapter
Hi I am working in a Windows C# application. I m using Dataset. But whenever I updated the dataset it gets updated. I can see the changes in dataset but using SQLAdapter.Upda te(Dataset) command It is not updating the table.
See my Code:
...Code:string connectionString = "server=ADJ-IND-01-0012\\SQLEXPRESS;database=Master;uid=sa;pwd=1234"; SqlConnection mySqlConnection = new SqlConnection(connectionString); -
Alt + 'Chr' Short cut key problem
I m working on windows application. Here in this i am giving '&' for short cut key. In design time I can see 'under score ' under that perticular character but in run time i am not able to see that ..so please tell me what is the exact problem. -
It worked.
Thanx
Thanx
Thanx
Thanx
Thanx
I am very happy...thanx once again..Leave a comment:
-
Hi,
My Code is
: SqlDataAdapter SDA = new SqlDataAdapter( "Select * from WFF", DAC.Conn); SDA.Fill(dt,"WF F");
//Updates dt here
SDA.Update(dt);
suppose 'dt' contains
1 Sachin 10000
2 Sam 10000
3 XYZAB 20000
I add 2 more rows
now my dt looks like
1 Sachin 10000
2 Sam 10000
3 XYZAB...Leave a comment:
-
Hi,
I am not creating excel sheet.
1) I will be provided excel sheet to user. User will provide the excel sheet path. 2) right now I am using Office Excel 2007....Leave a comment:
-
Problem in Updating Dataset to database using SQL Adapter
I am using SQL Adapter to select data from a table in SQL Server Database. After creating Object I am filling that to a datatable. Assum that dataset has 5 row. After that I m updating that dataset and add 3 more rows. but not able to update that dataset to database table.
My code is following.
SqlDataAdapter SDA = new SqlDataAdapter( "Select * from WFF", DAC.Conn); SDA.Fill(dt,"WF F");
//Updates... -
Importing Data from Excel sheet to Dataset
I am working on an application Where I want to import data from Excelsheet to Dataset. But While doing that i am facing following problems:
1) When I close excelsheet and try to import data from excel it gives me following error.
Code is as follows:
...Code:public DataTable originalData1(String _filename, String _sheet) { OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;DataLast edited by DrBunchman; Aug 12 '08, 07:14 AM. Reason: Added [Code] Tags - Please use the '#' button
No activity results to display
Show More
Leave a comment: