|
Try to rearrange your post. As it stands it doesn't make much sense.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi Guys
I'm working on CMS Project, this is big project.
i 'm developing a Server so that client send data to Server, and Server will insert or query data to/from SQL Server 2005.
my question is:
1 - When client send data to Server. i open new Connection -> insert data to SQL then close Connection OR i only open connection at starting CMS Server and then client send data to server -> insert data direct to SQL Server, because Connection always opening. Client will send too much Data to CMS Server
2 - Do i need make 2 connections:
- 1 For Update Database(Insert,Update,Delete) always Open
- 1 For Query Data. i mean if 1 Client send request to Query Data from CMS Server. At that time CMS Server Open connection to SQL Server -> Query Data -> Close Connect
I mean 1 connection to Update Data always Open, 1 connection to Query data always Open and Close data. because Client sometime send request to get data.
Thanks and best regards
THien Nguyen
|
|
|
|
|
it depends if database connection is very fast.
Eg, if server and database are on same local network, you may close connection after doing something. Otherwise you have to let the connection open for lifelong, or server is too tired with database connection.
2 connections are absolutely bad design, if you want to limit query/update for a user, you can add limitations (such as doing only once in 5 minutes) to his ip (socket).
|
|
|
|
|
you said that "2 connections are absolutely bad design" could you please plain me why bad design?
Thanks and best regards
|
|
|
|
|
Hi,
How can I create an Array that contains CObArrays. For Instance, I have something like this, but isn't working right.
CObArray1 a;
CObArray2 b;
for(int i=0; i< 10; i++){
b.Add(&a);
}
CObArray ReadAtindex3.Copy( *(CObArra*)b.GetAt(2) );
|
|
|
|
|
Software2007 wrote: CObArray ReadAtindex3.Copy( *(CObArra*)b.GetAt(2) );
You should split this into 2 lines.
CObArray ReadAtindex3;
ReadAtindex3.Copy
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I have it split up, but doesn't work. I am using b.add(&a), is this actually adding an array every time I hit it, or does it replace the contents of the arrays with the new one? How would you build an array of CObArray arrays?
"Failing to prepare is preparing to fail"
|
|
|
|
|
|
tuan1111 wrote: All running on a computer not installed any OS yet.
Please Explain
|
|
|
|
|
What do you need? install OS?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Could you please read the posting guidelines[^] ? You've been posting such questions for a while now and it's time for you to learn how to ask your question properly (well, if you want some help).
|
|
|
|
|
tuan1111 wrote: All running on a computer not installed any OS yet.
You simply can't do that. Any other question?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I posted a feedback issue
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=463503
Essentially code that was working in VC6 listed below does not compile:
const char* trimChars = "\\/|*?'\"<>;:";
std::remove_if(
fileName.begin(),
fileName.end(),
std::bind1st(std::ptr_fun(strchr),trimChars)
);
The only work around I could think of was to wrap strchr inside another function like this:
char const* compare(char const* str, int c)
{
return ::strchr(str,c);
}
Is this a bug in the compiler or am I missing something?
--Joe
If winter comes is spring far behind? - (PBShelley -Ode to the West Wind)
|
|
|
|
|
Microsoft have added a second overload for strchr (one uses char*, one uses const char*). You need to cast strchr to the function type you need, to disambiguate for ptr_fun. Here, I've used static_cast to specify the const char* variant of strchr.
std::remove_if(fileName.begin(), fileName.end(),
std::bind1st(std::ptr_fun(static_cast<const char*(*)(const char*, int)>(strchr)),
trimChars))
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks. Like all good ideas it looks obvious after the fact.
If winter comes is spring far behind? - (PBShelley -Ode to the West Wind)
|
|
|
|
|
I need help in joining .wav and .avi files. I generate them using my code. Can any one help me or give me classes I need to use?
|
|
|
|
|
DirectShow [^]may be of help to you
|
|
|
|
|
No. I need VC++ code to combine them. I need to embed it into my application. Do you have any sample code which can direct me?
|
|
|
|
|
i dont have a sample code with me. but i feel that the classes in DirectX SDK will help you in doing that.
You need to download the SDK from Microsoft site. Its freely available
|
|
|
|
|
Nikhil_7777 wrote: . I need VC++ code to combine them.
If you are a programmer, write code because you are paid to do it. If you are not a programmer, hire one.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
You can use DirectShow from C++, and it's probably the best way to do things like this.
However, if you want an alternative, have a look at the Windows Multimedia functions (AVIFileOpen, AVIStreamRead, AVIStreamWrite etc.). Note that they do have limitations, and DirectShow is the better option.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
I was working on a GPL project so I thought and used another GPL Project ffmpeg and used it. I'm done now (for now)
Thanks a lot
|
|
|
|
|
Hello,
I am trying to send a message across processes. However, the message is not successfully sent.
Here is what happens:
a) If the process (from which message is to be sent) is not elevated, then GetLastError returns 5 which means access error.
b) If the process (from which message is to sent) is elevated, then the message is sucessfully sent.
Now the problem is I cannot elevate the process. Is there any work around or possible solution.
Thanks.
|
|
|
|
|
I think you need to indicate what o/s, what version of c++, and how you are sending the message - eg postmessage, sendmessage, carrier-pidgeon for others to help/make sense of your request
'g'
|
|
|
|
|
OK. Here are the details:
I am using Windows Vista. I am developing the application using VS 2005 (C++). I have tried PostMessage & SendMessage. Both have same behavior in both cases.
Thanks.
|
|
|
|