15,917,645 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Teamsar Muliadi (Top 39 by date)
Teamsar Muliadi
8-Feb-11 2:09am
View
Deleted
Emmm.. Okay.. i will share about about my application as your information..
In my app i have 2 timers, Timer A and Timer B.
Periodically Timer A will check an signal like semaphore concept i think, if that signal is true or false. If true, a job like loading data from database (about 100 messages) will be processed until finished (signal = false).
These output will be inserted to table first, and then Timer B will do a job like sending ack messages to client per 1.5 seconds.
The main problem is, number of output (total ack) is not same with incoming in the output table whereas my application (console) doesn't processing it again (keep in mind that my app is still running, because of theses timers).
Teamsar Muliadi
12-Jan-11 2:39am
View
You can try this one :
public void DoInsertDataIncomingMsg(object sender)
{
OracleConnection objCon = new OracleConnection(CReaderConfig.StructureAppSettings.connStringAkses);
try
{
objCon.Open();
oTransc = objCon.BeginTransaction(IsolationLevel.Unspecified);
//oTransc.IsolationLevel = IsolationLevel.ReadCommitted;
oCommand = objCon.CreateCommand();
oCommand.Transaction = oTransc;
if (oCommand.Transaction == null)
{
log.Debug("Transaction 1 is null");
}
oCommand.CommandText = CQuery.Q_INSERT_INTO_T_INCOMING_MSGS(((CCommonStruct)sender).incoming_date,
((CCommonStruct)sender).membercode, ((CCommonStruct)sender).status_code,
((CCommonStruct)sender).getReferenceID);
oCommand.ExecuteScalar();
byte[] newvalue = System.Text.Encoding.Unicode.GetBytes(((CCommonStruct)sender).get_clob_messages);
log.Debug("New value : " + System.Text.Encoding.Unicode.GetString(newvalue));
log.Debug("Reference ID : " + ((CCommonStruct)sender).getReferenceID);
oCommand.CommandText = CQuery.Q_UPDATE_T_INCOMING_MSGS(((CCommonStruct)sender).getReferenceID);
if (oCommand.Transaction == null)
{
log.Debug("Transaction 2 is null");
}
using (OracleDataReader reader = oCommand.ExecuteReader())
{
reader.Read();
global::System.Data.OracleClient.OracleLob clob = reader.GetOracleLob(0);
clob.Write(newvalue, 0, newvalue.Length);
}
oTransc.Commit();
}
catch (Exception ex)
{
oTransc.Rollback();
log.Debug("Error while executing DoInsertDataIncomingMsg for Reference ID : " + ((CCommonStruct)sender).getReferenceID, ex);
}
finally
{
if (objCon != null)
{
objCon.Close();
oTransc.Dispose();
}
}
}
Teamsar Muliadi
8-Dec-10 4:24am
View
Mmm.. after i read the link (msdn) above, i have a question for you. How about destructor if we don't have constructor ?? Thanks :)
Teamsar Muliadi
8-Dec-10 4:19am
View
It means that if we want to implement IDisposable interface, the class(es) must have constructor, doesn't it ?
(after i read your links).
Teamsar Muliadi
26-Oct-10 0:58am
View
Hey... it works... :) thanks for giving me solution.. :)
Teamsar Muliadi
7-Oct-10 7:08am
View
Is there anybody can help me..??
Teamsar Muliadi
4-Oct-10 22:10pm
View
thank you cmanderson.. :)
Teamsar Muliadi
4-Oct-10 2:52am
View
Is anybody can help me please.. :(
Teamsar Muliadi
30-Sep-10 0:46am
View
Anybody can help me please..?? :(
This is the big problem i think... I have spent 2 days of my time for this problem.. but there is no result..
Teamsar Muliadi
30-Sep-10 0:23am
View
It doesn't work buddy.. :(
Teamsar Muliadi
27-Sep-10 7:57am
View
Hehehe.. sorry.. if "padleft" in my description is meaningless or has no a meaning.. :)
The point of my question is, is there any "built in" function to handle the format.. thank you.. :)
Teamsar Muliadi
27-Sep-10 7:49am
View
Mmm.. ok.. but how to get BankID, ExtRef, SeqNum.. if i have splited this string.. and the result like this :
BankIDExtRefSeqNumACCurCodValDateOpenBalValDateTrxtRefTrxTypeDCCashValDescriptionCloseBalNote
NB : Length of each other is different.. and we don't know about its length (BankID, ExtRef, SeqNum.. etc)
Teamsar Muliadi
24-Sep-10 0:49am
View
ok.. you have just made some thread.. But, how do you implement these threads if you have some message to be processed by these threads ??? :confuse:
Teamsar Muliadi
24-Sep-10 0:43am
View
using System.Xml;
/**
* sample of xml :
* <record name="TotalThread">
* <field name="total">5
*
private int GET_NUMBER_OF_THREAD()
{
int total_thread = 0;
XmlTextReader obj = new XmlTextReader();
while(obj.Read())
{
string flag = obj.GetAttribute("name");
if(flag == "total")
{
total_thread = obj.Value;
}
}
return total_thread;
}
Next step...??
Teamsar Muliadi
23-Sep-10 23:55pm
View
Sorry.. if my english is so bad... so you can't exactly sure what i mean.. :(
Yes.. i know how to make a thrad, read an xml file, and use a for loop. But, how to implement this problem.. i'm really2 blank.. what is the main point to start first.. may you help me to give me an example please.. ?? :(
Teamsar Muliadi
2-Sep-10 0:23am
View
Thank you helmy. :)
Teamsar Muliadi
1-Sep-10 5:35am
View
Is there any other difference between these collections, i mean IDictionary is more faster than hashtable.. ??
Teamsar Muliadi
1-Sep-10 5:28am
View
Mmmm... why did you say not to use ArrayList ?? Give me your reason, please.. :) so i can believe, that i should not use array list. And in my project, no matter how much memory will be used.. i want my application more faster than before. May you advice me, which one is the best for this situation..??
Teamsar Muliadi
31-Aug-10 3:27am
View
Ok.. :) thank you aspdotnetdev.. :)
Teamsar Muliadi
31-Aug-10 3:15am
View
Mmmm... i see.. :), but.. according to you.. which one is the best practice from these cases above ??
Teamsar Muliadi
31-Aug-10 3:12am
View
Mmm.. but, how about in the first case ??
Teamsar Muliadi
30-Aug-10 2:57am
View
Btw, what is the difference between "asynchronous thread" and "not asynchronous" guru..?? And how about "Thread Join" ?? would u tell me..??
Teamsar Muliadi
30-Aug-10 2:51am
View
Mmm.. ok.. :) thank you guru.. :)
Teamsar Muliadi
30-Aug-10 1:07am
View
Hhhmm... i see.. :) but, how about "peformance" and "bottleneck" guru ??
Teamsar Muliadi
27-Aug-10 5:41am
View
DEFINITELY faster ?? wooww.. That sound seems good.. :) Mmm.. ok.. i will try as u tell me.. Thank you. :)
Teamsar Muliadi
27-Aug-10 5:37am
View
ExecuteScalarQuery is a method that return an object as value.
Teamsar Muliadi
27-Aug-10 5:11am
View
Mmm.. are u sure it is more faster than my trick in convert an object to int expert :confuse: ??
Teamsar Muliadi
26-Aug-10 22:34pm
View
Mmm.. i think so.. :( My basic in programming is not good enough... :( I will try to start learning. Thank you.
Teamsar Muliadi
26-Aug-10 22:31pm
View
Thank you for your explanation Al-Farooque.. :)
Teamsar Muliadi
26-Aug-10 6:26am
View
Mmmmm.. it means that i have made "coupling".. is it right..?? Do u have some best practice for this problem..?? :) Thanks
Teamsar Muliadi
26-Aug-10 6:23am
View
Hhmmm... i'm not sure about your opinion expert.. :( Sorry.. :(
You should have given the best way based on your best practice, not based on my problem.
I'm afraid I'll miss some of the data if I use this way, coz' my project will process much data.. so i must implement the best way... Thank you expert.. :)
Teamsar Muliadi
26-Aug-10 6:07am
View
Is this accessor consume much memory ?? :( and based on your answer, we must make our variables private, it means that, i should have made 'each class would have their own set of variables'.. right??
If it's right, i have one question for u expert.. hehehehe.. :)
The many variables that we make, the more memory consumed.. is it right..??
Teamsar Muliadi
25-Aug-10 22:18pm
View
Thank you Mohammad :)
Teamsar Muliadi
25-Aug-10 5:36am
View
Thank u.. :)
Teamsar Muliadi
25-Aug-10 2:54am
View
Hehehehe... you have just made a joke.. :D It's need much time to read one by one the article.. :) Would u make a simple sample for guiding me a good programming in struct based on my problmem ?.. hehehe.. :) Thank u.
Teamsar Muliadi
20-Aug-10 2:24am
View
Mmm.. yup, i have known about it.. To make an autoincrement, we must create a sequence and then make a trigger for it.. :)
My question is how to reset the autoincrement.. and then you have just said update the sequence.. but i don't know how to do that.. would u like to help me, how to do that expert ??
Teamsar Muliadi
16-Aug-10 3:26am
View
Thank you Prakash Kalakoti :), this code is very helpful for me.. :)
Teamsar Muliadi
16-Aug-10 3:25am
View
Reason for my vote of 5
This code is helpful for me.
Teamsar Muliadi
16-Aug-10 1:17am
View
ParameterizedThreadStart has a method void(obj). If i use this code :
oThread1 = new Thread (new ParameterizedThreadStart(SendAckDetail));
oThread1.Start(memberID,partName,AccNum);
There are many errors occur.. :(
Show More