|
Guys,,,
Thank you so much. Now I understand that the second parameter is the lenght, not the position of the character where you want to end.
Thankz so much..
|
|
|
|
|
paulcortez wrote: Code was supposed to be MessageBox.Show(strTest.SubString(2, 3)); right?
Second parameter is number of characters in the string you want to display. If you want to display the last two characters in the string, leave off the second parameter.
If you need to display a certain number of characters starting at 2 and you want to be sure it doesn't hit the out of range check the starting character plus number of chars you want to display against the strTest.Length value. If the starting plus number to display exceeds length, then you're out of bounds.
Mike Poz
|
|
|
|
|
Guys,,,
Thank you so much. Now I understand that the second parameter is the lenght, not the position of the character where you want to end.
Thankz so much..
|
|
|
|
|
public string Substring(
int startIndex,
int length
);
damianbc
|
|
|
|
|
Specified cast is not valid.
(InvallidCastException)
i'm unable to correct this, so that report is displayed. If anybody have any idea about it, please help me.
thanks.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
uroojkhan wrote: Specified cast is not valid.
(InvallidCastException)
i'm unable to correct this, so that report is displayed. If anybody have any idea about it, please help me.
Well posting the line of code that throws the exeception might be a good start.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
Michael P Butler wrote: Well posting the line of code that throws the exeception might be a good start.
Thanks for comments.
Well i'm not new to crystal report, but yes new to C#.net.
I created a report but after alot of tries i'm unable to add/include/embed/integrate (what ever you call it) with my c# project.
I just asked the suggestion or guideline (if someone have). If you don't have then don't bother yourself.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
uroojkhan wrote: Thanks for comments.
Well i'm not new to crystal report, but yes new to C#.net.
I created a report but after alot of tries i'm unable to add/include/embed/integrate (what ever you call it) with my c# project.
I just asked the suggestion or guideline (if someone have). If you don't have then don't bother yourself.
Unless you can post more detailed information, then we won't be able to help or suggest solutions.
Sorry if my original reply sounded off-hand. From your original post, it sounded like you had code for showing the report which as throwing an exception.
A quick google will produce lots of C# examples on using Crystal Reports. MSDN has some good samples as does the BusinessObjects web-page.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
Hi,
Before the post, I also tried MSDN examples exactly in the same way. Now I think, there might be some problem in my current softwares installation, or (as sounds from my collegues) there might be less support in visual C# 2005 Express Edition. Well i'll try it later again.
I'm Sorry too because of my last day harshness.In fact this problem make me too tired (+ some other reasons too).
Well Best Regards.
Urooj Khan
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
This is simple, i wont to insert into a database some values, here is the code:
private void insertToDB(SQLConnection conn)<br />
{<br />
String sql = "";<br />
SqlCommand command;<br />
<br />
try<br />
{<br />
conn.Open(); <br />
<br />
foreach (customerGroup group in customerGroups)<br />
{<br />
command = null;<br />
sql = "INSERT " + group.getID() + ", '" + group.getGroupName() +"', " + group.getGroupParentID() + ", " + group.getLevel() + " INTO [custGroups]";<br />
command = new SqlCommand(sql, conn);<br />
command.BeginExecuteNonQuery(); <br />
} <br />
<br />
}<br />
catch (Exception ex)<br />
{<br />
throw ex;<br />
}<br />
finally<br />
{<br />
conn.Close();<br />
}<br />
<br />
}
My connectionstring is:
Server=XXX\YYY;Database=ValkyriaDB;User ID=XXX;Password=YYY;Trusted_Connection=False;Asynchronous Processing=True;
(sorry about the smile but i did not know how to disable them)
My first question is that one running this it throws exception that i must enable Asynchronous Processing in my connection string, why is this?
Ok, so i enabled it. What happens, it throws a new exception connection does not support MultipleActiveResultset series.
So could somebody help me with this, because i simply dont understand. Im a java programmer and the above code is identical to my java code except for that i use prepered statements i the loop. If there is a better and easier way to do this please also tell me.
Johan
-- modified at 7:57 Monday 26th June, 2006
|
|
|
|
|
|
Hello all,
i am using asp.net 1.1. I want to disable the Browser back functionality means when clicking on back button it should not be goes back.
how to do this.
plz help me
regards
GV Ramana
|
|
|
|
|
Are you talking the desktop browser or a browser in your own application?
If you mean in you own application, the way to prevent GoBack() from everworking would be to clear your browser object's history after each navigate completes. Unfortunately I haven't found a way to do that and I can't find any codeproject articles or when searching MSDN, searching with Google and searching with MSN search that explain how to do it.
My quick and dirty suggestion would be to not implement/expose that functionality by leaving off the "back" button in your application. Additionally, since you cannot go back, it would make no sense to implement a "forward" button either. Unfortunately that leaves open the possibility that the user will use the backspace button while the focus is on the browser window and not in an editable field which would most likely cause a GoBack() to occur.
Sorry, best I can do for you.
Mike Poz
|
|
|
|
|
Hello all,
for asp.net 1.1 project, i have oracle 9i client. Using 9i client i am able to access the clinet. but with asp.net application it is giving following error
System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.
i am given permissions to ora92 folder. still it is givng same problem
any solution.
regards
GV Ramana
|
|
|
|
|
|
i want to write and read file with attribute and properties and value.plz help me.
-- modified at 7:30 Monday 26th June, 2006
|
|
|
|
|
Check these classes in your MSDN:
XmlDocument
XmlReader
XmlWriter
|
|
|
|
|
thanks. i am trying. can u give me a complete example.
|
|
|
|
|
|
hi all,
how can i get my computer's ip or mac address with c# ?
is there a tutorial to learn much about getting tcp/ip settings ?
thanks in advance, bye.
|
|
|
|
|
http://www.codeproject.com/cs/internet/host_info_within_network.asp
|
|
|
|
|
This possible in .NET 2.0.
|
|
|
|
|
Mehmet Fatih Akbulut wrote: how can i get my computer's ip or mac address with c# ?
Mac Address[^]
IP Address[^]
You can try googling to get more details.
Tarakeshwar
MCP, CCIE Q(R&S)
Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes.
!sgub evah t'nseod margorP sihT ?sgub naem ayaddahW
|
|
|
|
|
Hi!
I don't even know if this is possible or not...
I have an (3rd Party) application, that writes text into a logfile. I want to intercept this filestream an handle it in my own application. Is it possible (and how is it possible?) to redirect the stream into my application (or to get a copy of it)? I suppose that I have to use some win32-Api functions to achieve this.
Any help is appreceated
Thanks
Dirk
|
|
|
|
|