|
I will give that a shot. I will respond a bit later with the results.
Thank you very much.
|
|
|
|
|
I tried to get an IHTMLWindow2 interface using your suggestion, but was unsuccessful. I need to use the function HRESULT IHTMLWindow2::get_history(IOmHistory **p), but I have yet to find a way to reach that interface.
Perhaps I am not looking at the right place or that interface is not reachable. I am a little new to this area of VC++, please excuse me if the answer might be apparent.
Jamie Parent
VC++ Developer
Digital Immersion
jamie@digital-immersion.com
|
|
|
|
|
HI
I use (Microsoft FlexGrid Control, version 6.0) which is active x control .
It’s very useful, but some member functions are unclear .
Now I’m interested in how useing two functions and maybe they
will be the keys of the rest functions .
1 – void AddItem(LPCTSTR Item, const VARIANT& index)
to add new rwo BUT HOW???
2 - long GetRowData(long index)
to get data from specific row BUT HOW???
I put this qustion befor and one told me look for (MsFlxGrd.hlp) I tried to find it
but there is no file like this
Thank you very much …
AHMAD ALWASHALI
|
|
|
|
|
AddItem insert the text in the FixedRow for example:
AddItem("nnnn", 2) insert the text in the second row of the fixed column
If you want to insert data in a FlexGrid you need to set teh Row (SetRow), then the column (SetCol) and then SetText for insert the text in that Row and column.
If you need to read you can use the function GetText.
Good Luck
Carlos Antollini.
|
|
|
|
|
AddItem insert the text in the FixedRow for example:
AddItem("nnnn", 2) insert the text in the second row of the fixed column
If you want to insert data in a FlexGrid you need to set teh Row (SetRow), then the column (SetCol) and then SetText for insert the text in that Row and column.
If you need to read you can use the function GetText.
Good Luck
Carlos Antollini.
|
|
|
|
|
Hi every one
I use try and catch to initial some things or destroy when some thing wrong.
It’s works fine ,but an debug assertion occurred when destroy window.
My code like this :
BOOL MyDlg::OnInitDialog()
{
m_dat = new CDaoDatabase;
try {
m_dat->Open("dat.mdb");
}
catch (CDaoException* e){
delete m_dat;
m_dat=NULL;
e->ReportError();
e->Delete();
CDialog::OnCancel();
}
}
I hope for any one can help me to avoid that debug assertion and tell me more about it ...
Thank you,,,
AHMAD ALWASHALI
|
|
|
|
|
Off the top of my hat, try replacing OnCancel() with EndDialog(IDCANCEL) .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
The reason you get a debug assertion is so you can go into the debugger and see where the ASSERT has failed, and therefore do something about it. Often it doesn't actually kill your program, it is warning you however that you've leaked memory or done something else that needs cleaning up.
I'd suggest if you have this problem in future, you look at where it is occuring, and if you can't fix it, post where it crashes as well as the block of code that is crashing.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I have a program connected to SQL. It use 4 tables.In each table around 1 mln record. What should I do to spead up my programm. Basicly it doing the select and delete statement on 4 tables.
Thanks
|
|
|
|
|
Always for the better performance, you need to execute store procedure.
I need to do some questions.
How you select the records?
How delete the records? Theses are consecuence from the select, or the user select the records that he wants to delete? etc.
The better performance depends that you need to do, and how you must to do it.
Say me some details.
Best Regards....
Carlos Antollini.
|
|
|
|
|
More details on my programm:
My program use 4 table (1 mil record each)
Step 1: I read the row in table 1(num,id).
Step 2: Check if record exists(based on the num and id)in rest of 3 tables.
Step 3: If record is not exists in table 2,3 or 4 delete the record from all 4 tables, if exists move to the next record in table 1.
Step 4:Do until EOF.
Let me know if this helps to understand my problem.
Thanks
|
|
|
|
|
This is a process. This can be resolved with a Stored Procedure with a cursor over the table1 in it
That cursor can check each table making that you need.
See the Documentation of Transact SQL where you can find good samples of cursors.
But a question. I suppoused that you are working in SQL Server, It's true, because if you are working over Access databases you must to do this by program.
Carlos Antollini.
|
|
|
|
|
Thank you for answering. I already tryed the cursor(SQL). It takes even more time to run than using my program.
This is my SQL:
DECLARE @num int, @id varchar(10)
declare @row_count int
SET @row_count = 0
DECLARE c1 CURSOR FOR
SELECT distinct num,id FROM table1
OPEN c1
FETCH NEXT FROM c1 INTO @num, @id
WHILE @@FETCH_STATUS = 0
BEGIN
SET @row_count = @row_count + 1
print "row count:" + convert(varchar,@row_count)
if NOT EXISTS (select * from table2 t1
inner join provceff_new t3 on t1.id=t3.id and t1.num=t3.num
inner join provcont_new t4 on t1.id=t4.id and t1.num=t4.num
Where t1.num=@num and t1.id=@id)
begin
PRINT "Deleted id:" + @id + " " + convert(varchar,@num)
delete from table1 where num=@num and id=@id
delete from table2 where num=@num and id=@id
delete from table3 where num=@num and id=@id
delete from table4 where num=@num and id=@id
end
FETCH NEXT FROM c1 INTO @num, @id
END
CLOSE c1
|
|
|
|
|
I have A idea for your Cursor...
Before to open the cursor insert the data in a temporal table.
select * into #tmp from table2 t1
inner join provceff_new t3 on t1.id=t3.id and t1.num=t3.num
inner join provcont_new t4 on t1.id=t4.id and t1.num=t4.num
There in the cursor make the NOT EXISTS over the temporal table
if NOT EXISTS(Select * From #tmp where t1.num=@num and t1.id=@id)
begin
....
In that mode you can save time making several joins.
Try with this....
Cheers!!!
Carlos Antollini.
|
|
|
|
|
Like this????
DECLARE @num int, @id varchar(10)
declare @row_count int
SET @row_count = 0
DECLARE c1 CURSOR FOR
SELECT distinct num,id FROM table1
OPEN c1
FETCH NEXT FROM c1 INTO @num, @id
WHILE @@FETCH_STATUS = 0
BEGIN
SET @row_count = @row_count + 1
print "row count:" + convert(varchar,@row_count)
select * into #tmp from table2 t1
inner join table3 t3 on t1.id=t3.id and t1.num=t3.num
inner join table4 t4 on t1.id=t4.id and t1.num=t4.num
if not exists(
select * from #tmp Where t1.num=@num and t1.id=@id)
begin
PRINT "Deleted id:" + @id + " " + convert(varchar,@num)
delete from table1 where num=@num and id=@id
delete from table2 where num=@num and id=@id
delete from table3 where num=@num and id=@id
delete from table4 where num=@num and id=@id
end
FETCH NEXT FROM c1 INTO @num, @id
END
CLOSE c1
|
|
|
|
|
No like this
DECLARE @num int, @id varchar(10)
declare @row_count int
select
*
into #tmp
from
table2 t1
inner join table3 t3 on t1.id=t3.id and t1.num=t3.num
inner join table4 t4 on t1.id=t4.id and t1.num=t4.num
SET @row_count = 0
DECLARE c1 CURSOR FOR
SELECT distinct num,id FROM table1
OPEN c1
FETCH NEXT FROM c1 INTO @num, @id
WHILE @@FETCH_STATUS = 0
BEGIN
SET @row_count = @row_count + 1
print "row count:" + convert(varchar,@row_count)
if not exists(select * from #tmp Where t1.num=@num and t1.id=@id)
begin
PRINT "Deleted id:" + @id + " " + convert(varchar,@num)
delete from table1 where num=@num and id=@id
delete from table2 where num=@num and id=@id
delete from table3 where num=@num and id=@id
delete from table4 where num=@num and id=@id
end
FETCH NEXT FROM c1 INTO @num, @id
END
CLOSE c1
Best Regards!!!!
Carlos Antollini.
|
|
|
|
|
Im sorry I have an error
This is the correct line
if not exists(select * from #tmp Where num=@num and id=@id)
Carlos Antollini.
|
|
|
|
|
Thank you.
I'll try to run this.
I'll let you know the results.
|
|
|
|
|
Im sorry I have an error
This is the correct line
if not exists(select * from #tmp Where num=@num and id=@id)
Carlos Antollini.
Carlos Antollini.
|
|
|
|
|
use joins.. they are exactly for step 1 - 2-> and then delete this tables..
other thing: use nested table expressions (is this possible in SQL - Server.. don't know.. cause i use SQL)
but stored procedures would be better anyways..
Bernhard
|
|
|
|
|
I want to use farsi language in my project ,But the standard controls(Edit Box,Static text) can't show this language I use windows 2000 and I enabled Farsi language & installed Farsi fonts & changed Dialogs font to that font But it is don't any effect
Iman Ghasr-e-fakhri
|
|
|
|
|
I have the same problem. Please some one help
|
|
|
|
|
I am trying to add a few new event log messages to the program that reports its status to the event log. I had added all the corresponding entries to the .MC file and compiled it(using "MC" command), but after I ran updated executable, instead of needed test, I found the following message in the event vewer:
"The description for Event ID ( 7 ) in Source ( FSAINQ_Builder ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: ."
Also, I tried to change the strings for existing messages, but event viewer DID not update those either.
Did lots of crazy and supersticious things like rebooting computer and restarting Event Viewer - nothing works.
If someone knows something on event logging API, message compiler, message recourse files(.RC), etc., please let me know what you've got in your bag.
Thanks in advance.
Kirill.
|
|
|
|
|
Do you have the correct path in the regsitry entry EventMessageFile? Because this is the typical message error when this happens.
Cheers!!!
Carlos Antollini.
|
|
|
|
|
Carlos, I DO have a correct path.
In InitInstance(), this application creates the following registry key in the root of HKEY_LOCAL_MACHINE:
"\SYSTEM\CurrentControlSet\Services\EventLog\Application\<executable filename(without="" ".exe")="">\"
Then, it obtains complete path of its executable(using GetCurrentDirectory()) and then inserts this path under "EventMessageFile" entry in the root of key, specified above.
I tried moving this executable in variety of directories, and every time, the correct home path of executable would be displayed in regedit.
I am lost.
|
|
|
|