|
|
Is your problem resolved?
Keep me posted on this.
|
|
|
|
|
Dear Developer,
I'm very much concern linq versus stored procedures. can you give an idea where is the best tools to data execution and distribution more faster
TY
|
|
|
|
|
Are you asking how to use stored procedures in Linq to Sql? AFAIK, Entity Framework is replacing Linq to SQL. You should take a look at entity framework rather than learning obsolete framework.
Rolando Y. Puno wrote: where is the best tools to data execution and distribution more faster
What do you mean by that?
IMO, frameworks like Linq to SQL and Entity framework provides a clean abstraction over the data access. It helps you to write maintainable and readable code than giving super fast performance. You get much better performance when you work directly with commands and data readers. My suggestion is to write maintainable code than thinking about performance.
|
|
|
|
|
The SQL generated by EF is sometimes not the best from a performance basis so you may need to use stored procs in conjunction to get the best from it.
only two letters away from being an asset
|
|
|
|
|
Hi I have a service written in Visual C++ 6 that needs to interact with an application written in vb.net. In my service I have used :
<b>DWORD mymsg=RegisterWindowMessage("my_message")</b>
to register a unique custom message.
I then use:
<b>BOOL b=SendNotifyMessage(HWND_BROADCAST,mymsg,NULL,NULL)</b>
to broadcast my message. However, I can't seem to be able to capture this message in the Windowproc function of my vb.net application.
<b>Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Integer
Dim mymsg As Integer = RegisterWindowMessage("my_message")
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
if m.Msg=mymsg then
--do something--
end if
end sub</b>
Please help!
P.S.:I need to show a pop up in my .net application when it receives this message. The message values have all registered properly in both applications and are returned to be the same when I print them. Also the SendNotitfyMessage in my service returns a non zero value(supposed to indicate success). What do I do?? What am I doing wrong? Is there something wrong with my message receiving code in vb.net?
|
|
|
|
|
Try changing your WndProc declaration to:
<System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
Protected Overrides Sub WndProc(ByRef m As Message)
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
Thanks for the suggestion but I tried it and it didn't really work. I don't think it's a security issue. I doubt that.
|
|
|
|
|
Erm I just read your post again and see you are talking about a "service". If you mean a windows system service, then what Mark said is right: you shouldn't be using windows messages to exchange information - follow his advice and use some other form of inter process communications.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
callousfantom wrote: a service written in Visual C++
A Windows service application? If so, services run in a different desktop
so you may want to use a more suitable IPC mechanism instead of window messages
which don't cross the desktop boundary.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Are you trying to say that since the service (SYSTEM acct) is running under a different user context than the application, that the messages won't reach the application from the service? Because my application can communicate via messages with my service using its handle.I've already done that. This implies I can only communicate from the app. to the service and not the other way around. Or does it mean that I can only use handles to communicate one-to-one and broadcasting won't work? Neither of the two seem to make sense to me.
As for another way, I could use custom named events but I've already done one way via messages and I thought I could do the same thing in the other direction.
If there's something else you were trying to suggest then I'm sorry I don't think I quite understood you.
|
|
|
|
|
Hi thanks for all the advice. I've managed to take care of it. I had to make the service interactive in order to make my application visible to it and I found no other way of making it visible due to the different user contexts. So you were right
|
|
|
|
|
Greetings.
I'm trying to communicate between desktop PC and Windows CE 5.0 device connected by usb (cradle).
I feel like I'm missing something obvious, because I can't find how to establish connection between them. What namespace to look? I just want simple communication: connect, exchange some data, disconnect. Sockets are more then enough, but what address should I access? The one assigned by usb connection on handheld is not accessible on desktop machine.
Communication should be initiated from desktop PC.
My handheld is running Windows CE 5.0 with .NET Compact Framework 2.0
Please point me to the right direction
--
"My software never has bugs. It just develops random features."
|
|
|
|
|
Maybe take a look at the rapi.dll and see if it does what you need, you need to p/invoke the methodes.
Take a look here
And here
|
|
|
|
|
how to perform calculations in datagridview columns
(adding two columns and result in new column)
can any one suggest me any site
thanks in advance
|
|
|
|
|
Some of the gurus on here will probably have a better idea for this but this is what I would try:
Dim myCol As New DataGridViewColumn ' I think this is the type. My code was an image column<br />
myCol.Name = "colname"<br />
dgvMyGrid.Columns.Insert(1, myCol)
Then you'll need to access the values of the numbers you need to add and the column where the result should go. I do most of my processing in my OnCellFormatting event. And in there, I access the values of the current row's items with something like this:
(sender.Rows(e.RowIndex).Cells(14).Value <br />
Of course, you'll need to know your column's number. And don't forget to account for the one you entered.
Hope this helps.
Denise "Hypermommy" Duggan
|
|
|
|
|
|
Hi
I have made a project and used
tabcontrol of Visual Studio 2005. The problem is that when I run the project and bring the mouse arrow to the tab heading it start blinking/trembling.
Please, reply if anybody can.
Thanks in advance.
|
|
|
|
|
It does not give idea..Provide some details..some code snippet..otherwise none can understand..
|
|
|
|
|
seems like you have a lot of activity in some kind of hover event.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi,
I want to append a file into a remote server file using FTP can you please suggest how i can do it .net 1.1
Thanks in Advance
|
|
|
|
|
|
Webclient supports only upLoadFile and UpLoadData , But how can i use to append a file which is already existing in Server.
if you have any sample code to perform Append please provide me i will be great help
Thanks in Advance.
|
|
|
|
|
Member 4181669 wrote: But how can i use to append a file which is already existing in Server.
You need to read the existing file contents, do the appending from your application and upload the new file. FTP doesn't provide a way to append to a file.
|
|
|
|
|
Hi. I've a multithreaded service application with many threads accessing a comom resource. I have a typical Readers/Writers environment, where many threads may read at the same time but only one can write to the resource, exclusively.
The thing is, whenever two threads (or more) asks for writing permission, I do not need to wait for the first thread to finish, I can just abort it (the first thread is no longer needed) and execute the second thread. Since writing is an expensive operation, it's desirable that I abort the first thread and execute the second.
So, here's my doubt: if I abort a thread that holds a lock, will it release the lock?
My simplified code looks like this:
private static System.Threading.Thread WritingThread =
System.Threading.Thread(MyClass.PerformWriting)
private void TryWrite()
{
If (WritingThread.IsAlive)
WritingThread.Abort();
WritingThread.Start();
}
private void PerformWriting()
{
MyReaderWriterLockSlim.EnterWriteLock();
try{
}
finally{
MyReaderWriterLockSlim.ExitWriteLock();
}
}
So here's the deal. I have a commom fixed writing thread for everybody, so I can test if the thread is already running, and if is, I can just abort it and initiate it again. This get the effect of aborting the first writing and executing the second. Whenever a thread needs to write to the resouce, it just calls the TryWrite function. The original calling thread doesn't need to wait the end of the operation, so it returns and finishes.
But, since "writing operation" takes a long time, it is more likely that the WritingThread will be aborted when it is writing, that is, when it holds the lock.
Is that code ok, or it will deadlock when the thread gets aborted in the middle of the writing?
Regards,
Leonardo Muzzi
|
|
|
|