|
no use...
still its giving error
Data Source ={0}
means...it will take file name
http://www.cboe.com/LearnCenter/pricehistory.xls
Provider=Microsoft.Jet.OLEDB.4.0; Data Source =http://www.cboe.com/LearnCenter/pricehistory.xls; Extended Properties=Excel 8.0;
like this....
|
|
|
|
|
If file is saved on my location machin..n if i have given path of tht
then it works..grd...
but for this its nt working...
may b i have to save tht file first in default location
do u know..hw to save file in default loaction without opening it..
|
|
|
|
|
Your Question was not clear from the Start now i see what is your Problem. You are Uploading the Excel file and the file does not Exists on the Server. What you need to do is to copy the file to the Server save it in the App_Data Folder and Processes it from there.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
sorry for inconvinence
but i wants to save that files through coding..code behind
how to do tht??
dnt want to open it..but i have to save tht file in default location...how to do tht through coding
i dnt want to create xcel object..bcz i have to update huge data with diff excel
so it will create prb if excel create objects
so..without creating excel object how to save file in default location?
|
|
|
|
|
Hey you cant have direct access to a file using web address like
http://www.cboe.com/LearnCenter/pricehistory.xls
You need to download the file to your local system and then you can use MDAC to access its data.
|
|
|
|
|
can i save tht excel in server side..through coding??
if yes thhn hw to do tht??
|
|
|
|
|
|
I want to know..without opening hw to save XLS File at default location
|
|
|
|
|
|
Heyyyyyyyyy......
Thanks a lotttttttttt
it works now...
thnku so much
|
|
|
|
|
You are most welcome...
And ...
Dont forget to click on Good Answer if it helps you.
|
|
|
|
|
Hi Dudes, Plz Solve these
I am trying to implement a sample report in asp.net using crystal reports10.0.
But i get an error of Object reference not set to an instance of an object
Here's my code
public void btn_Click(object sender, EventArgs e)
{
frmPreview Preview = new frmPreview();
rptInformation Info = null;
TableLogOnInfo logOnInfo = DBManager.getCrystalLogInfo();
Info = new rptInformation();
Info.Database.Tables[0].ApplyLogOnInfo(logOnInfo);
formulaFieldDefs = Info.DataDefinition.FormulaFields;
formulaFieldDef = formulaFieldDefs["CompanyName"];
formulaFieldDef.Text = "'" + Global.CompanyName + "'";
Preview.crystalRptViewer.ReportSource = Info;
}
Here I placed CrystalReportViewer in frmPreview
|
|
|
|
|
It seems that you are doing this in Winforms...
I think this is not the right section to post this.
On this ... you didnt mentioned where exactly the error you are getting...?
|
|
|
|
|
I am trying to Implement in Asp.net itself. I tried in these way.. Is there any better approach
I have specified the error
Preview.crystalRptViewer.ReportSource = Info; //Error: Object reference is not set to an instance of an object
|
|
|
|
|
Did you bind the data source properly?
Are you trying this in your Development environment or in Production server.
Generally this sort of error comes when Crystal report is not found in the server.
|
|
|
|
|
im using vs2003 and sql2000 im getting error in connection string.....
Keyword not supported: 'use procedure for prepare'.
Line 51: {
Line 52: string str= "select * from table1";
Line 53: SqlConnection cnn=new SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=new;Data Source=NETZOOM;Use Procedure for Prepare=1;Packet Size=4096;Workstation ID=NETZOOM;Use Encryption for Data=false;Tag with column collation when possible=False");
Line 54: SqlCommand cmd=new SqlCommand(str,cnn);
Line 55: DataSet ds=new DataSet();
SqlConnection cnn=new SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=new;Data Source=NETZOOM;Use Procedure for Prepare=1;Packet Size=4096;Workstation ID=NETZOOM;Use Encryption for Data=false;Tag with column collation when possible=False");
i tried by removing that keywords still this error
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
modified on Tuesday, December 1, 2009 6:46 AM
|
|
|
|
|
Just remove
Use Procedure for Prepare=1; from the connectionstring.
Refer to
www.connectionstrings.com[^]
for writing your connectionstring.
|
|
|
|
|
If i'm not wrong you will only need this part of your connection string to connect to the database
"Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=new;Data Source=NETZOOM;"
All other information is not necessary. Just try with this!
I would also suggest you to use Server Explorer to connect to the database to test the connectivity. You have a wizard there to help you and at the end of it you can get the connection string from the registered server's properties.
|
|
|
|
|
i tried actually this is the error im getting...
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
|
|
|
|
|
Try to manually register the server on the Server Explorer to connect to the database to test the connectivity. You have a wizard there to help you and at the end of it you can get the connection string from the registered server's properties.
BTW, are you sure if Windows authentication is enabled on the database?
|
|
|
|
|
Dinesh Mani wrote: Try to manually register the server on the Server Explorer
i did it and connection is successful there...
but still same error....
Dinesh Mani wrote: are you sure if Windows authentication is enabled
windows authentication is enabled..
|
|
|
|
|
Did you check the resultant connection string from the Server registration? You can get it by accessing the properties of the server. Try using that from your code.
If possible try to generate a dataset/datatable using the Visual Studio wizards and check if you are able to connect and fetch data from the code.
|
|
|
|
|
So, is 'NT AUTHORITY\NETWORK SERVICE' listed in SQL Management Studio as one of the users with access to the database? I guess not.
|
|
|
|
|
try to get the connexion string from the database properties and test it then put it in your code
|
|
|
|
|
What user do you use to check with Server Explorer if the connectionstring is valid?
Looks like an authorization-issue to me...
If it is a service, try running it under another account.
Nah... What's up, Doc?
CCC's solved : 1
|
|
|
|