|
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
|
|
|
|
|
Good Day
i can Help. First your Connection is not Correct it has to be done this way
SqlConnection cnn=new SqlConnection("Initial Catalog=new;Data Source=NETZOOM;Initial Catalog=NETZOOM User ID=sa;Password=mypassword");
now here is the Problem you might not have a sa password. I see above you want to use WindowsAuthontication. Create a SQL Account and use it for your Application.
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/
|
|
|
|
|
Hi,
I have two web applications with session state mode = SQLServer.
Both application are hosted in windows Server with different virtual names.
Now I have added the link of application2 in application1 Viceversa added application1 link in application2 to come back.
both applications are working fine..after some time when I click on link of application2 from application1 it is immediately displaying server error saying that
" Unable to serialize the session state. In 'State Server' and 'SqlServer' mode, ASP.NET Will serialize the session state objects, and as a result non-serialize objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode."
Application2 is having some sessions which holds some class objects, all classes are serialized classes,
and also some sessions holds datatables and hash tables directly will it be any problem, if so what is the solution for this.
As the site is in Live, It is very urgent to fix this issue.
Please help me to overcome from this problem.
Thanks
Haribabu K
|
|
|
|
|
Did you put any object that is not serializable into session ?
|
|
|
|
|
Hi Abhishek,
Thanks for the reply,
I am placing some class objects and List<objclass> objects in sessions, but all classes are serialized.
And also we are placing some dataset objects, DataTable objects and HashTable objects and ArrayList objects into sessions. will it be causing any problem.. if so what could be the solution..? else where is the problem.
Thanks
Haribabu K
|
|
|
|