|
Just create a console app and move your code into it. The main thing is, a console app does not have events, so you need to build your own menus and so on in plain text.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have done it in the same way...
ITs running well on my machine... But when I run that .exe file on another machines its saying
" application failed to initialize properly: Click OK to terminate the program"
whats the problem??
how can I run my .exe on another machines as well....???
|
|
|
|
|
There can be several reasons for this, try Google to see them.
Best guess is read access violation on some DLL file.
BTW the message typically includes an error code, if it did you should show it.
|
|
|
|
|
please give me code for create an child(already designed) form with in mdi form
|
|
|
|
|
We cannot do your work.
What you have done so for and what error it shows tell us that i have done this but i am getting this error.
Regards,
Satips.
|
|
|
|
|
It's a pretty straightforward question, probably just one function call to do it. I'd answer it, if I knew.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
private void categoryToolStripMenuItem_Click(object sender, EventArgs e)
{
empCat cat = new empCat();
cat.MdiParent = MdiParent;
cat.Show();
}
this is the code tell me the correct code where mdiparent is a form name cat is a object of empCat ( which i want to make a child of Mdi Parent Form).
Please Provide me Correct Code
|
|
|
|
|
this is the answer
empCat cat = new empCat();
cat.MdiParent = this;
cat.Show();
|
|
|
|
|
Sir, please explain further for a clearer pictures.
Dabsukol
|
|
|
|
|
|
It is because on your postback your datagrid will always be one step behind. I have had the same problem many times, the fix for it is to find what event you need to fire after and it changes for different situations, usually OnPreRender works. iam writing like this
protected override void OnPreRender(EventArgs e)
{
dg1.CurrentPageIndex+=1;
base.OnPreRender(e);
}
private void PreRender_Handler(object sender,System.EventArgs e)
{
dg1.CurrentPageIndex = Convert.ToInt32("");
}
by giving like this iam getting even records but not odd records.
srinivas
|
|
|
|
|
I have a form with report viewer control, it displays the report fine and all other toolbars works just fine except when I click Find (after entering a text of course), the reports return error "Object reference not set to an instance of an object".
All I did is just very simple, created a form, add the reportviewer control in the form, create a report (.rdlc), specify the datasource, and the report prints fine, it is really giving error only in Find text.
How do you correct this?
And what may have cause this error?
Your help is very much appeciated.
Thanks.
|
|
|
|
|
Do any experts here have a great idea on this issue?
Please help and let me know if you need a sample project so you can see and replicate this issue, then I can send it to you.
Thanks in advance.
|
|
|
|
|
I have a web page that can be access by multiple users at the same time.
My problem is that when the 1st user access the first record to process it, the 2nd user has also the priveledge to access and process it at the same time with the first user. Until the 1st hasn't clicked the process button anyone can see and modiy the record.
How can I block the 2nd/3rd user from processing the record that is already opened by 1st user?
How can I implement locking to inform the user that a certain record is already being processed by the 1st user since after retrieving the record from the database I am already disconnected..
Please give some advice since most of our web page has the same process. Tracking System per group.
Dabsukol
|
|
|
|
|
I have implemented concurency a while ago using TimeStamp fields.A TimeStamp are modified everytime a change is made to a record that contains such a field.Then you use the TimeStamp value in evey update query where concurency is an issue to ensure that the data has not been changed, for example:
<br />
<br />
UPDATE MY_TABLE<br />
SET SOME_FIELD= @SOME_VALUE<br />
WHERE ID = @SOME_ID<br />
AND TimestampID = @TimestampID<br />
|
|
|
|
|
Your rows need a 'locked by' column, which takes a user id. If it's not null, or a 'magic number', then it's locked. You probably also want to store the date/time it was locked, because you probably want the locks to automatically time out, otherwise, your system will fail if a user doesn't perform the action that unlocks it again.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you, we have the same thing in mind but can you provide code for my problem?
Dabsukol
|
|
|
|
|
If it's not self evident, you probably shouldn't be doing it. It's a bunch of code, to do something that's really trivial. Your users have an Id, you have a column which contains, say, 0, or the Id of the user ( assuming they start at 1 ) who has it locked. You store the time it's locked as well. When someone tries to lock a file, first check the date/time of the last lock, if there isn't a lock, or if it has expired, lock it, otherwise return a code which tells your UI to show an 'in use' message.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have a 3-Tier application. In the DAL I decribe my table containing some fields that are to be the ID of another table in my database. When I create my select statement it returns the fields as ints. I also created another select statement that returns strings for those fields(by inner join with their related table). The first select statement works, the second does not, since I am returning strings for a field that is expecting ints. How do I override this or how do I fix this problem.
The error I get is very generic:
Input string was not in a correct format.
I can post more of the error but it basically says it can't convert the string I am returning into the int it is expecting.
Thanks for any help.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I don't follow - if an int is expected, why are you not returning one ? Why are you returning strings instead of ints ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am filling dropdownlists. I have other tables in the database that contain the ID to be stored in the database, and the user friendly string. I am using inner join to do this. How do I fill dropdownlists in a 3-tier app based on the information in the table that has the ID.
Example:
My database contains the following tables:
Person:
Name (String)
Group (Int)
Static Groups:
ID (Int)
Group Name (String)
Data in the Person table might be:
Chris
1
Data in the Static Groups table might be:
1
Administrator
2
Power User
I am using DAL, BLL and presentation layers, and ObjectDataSources to connect to the BLL from the presentation layer.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
my datagrid has 30 records but requirement is only one record is displaying at a time and also i have next button.in output by default first record is displaying then after clicks on next button again first record is displaying after that 2nd,3rd,4th.................upto 30th is displaying ,my problem is why datagrid is displaying first record two times .
srinivas
|
|
|
|
|
It is because on your postback your datagrid will always be one step behind. I have had the same problem many times, the fix for it is to find what event you need to fire after and it changes for different situations, usually OnPreRender works.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
hi expert coming iam giving like this but in datagrid it is displaying even records please help me yaar please
is it correct or not
protected override void OnPreRender(EventArgs e)
{
dg1.CurrentPageIndex+=1;
base.OnPreRender(e);
}
private void PreRender_Handler(object sender,System.EventArgs e)
{
dg1.CurrentPageIndex = Convert.ToInt32("");
}
srinivas
|
|
|
|
|
Your trying to show every other record? Explain what you are doing, because it sounds like you are doing something different from what I original took it for.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|