|
Does the program produce any errors?
What code are you using to save the document?
|
|
|
|
|
Hi, I'm Alessio.
I've a problem with event handling in remoting.
I've a Server app (a simple WinConsole exe), I've a Client app (a simple one button form), I've a remote object (a simple dll referenced in both client and server app) and I've an "event wrapper" (a simple dll referenced in both client and remote dll).
My remote object has just a method by which I increase an internal counter and display it in the Server console window.
My Client app button, when pressed call the remote object method.
When I run the Client from two or more PC, all works fine. The counter is updated and its value displayed on Server console window.
After this, I've tried to add an event on remote object and handle it from the client.
I've found on the net the code I needed, so I've built the "event wrapper" object.
The wrapper works fine, because in my first test, when the remote object fires its event, I've got a messagebox on each client.
Now I've replace on client the "messagebox.show(RemoteObjCounter)" call with "textbox1.text = RemoteObjCounter" but it doesn't work and I don't know why.
In debugging mode on client, the "textbox1" object doesn't seem to be referenced.
Can anyone help me ?
Thanx in advance and excuse me for my bad english.
|
|
|
|
|
I am trying to capture the recordid for the record I just inserted and use it in another field in the same table. ex. the document number being generated uses the record id at the end of the field.
documentnumber = ("RTV-" & Format(Date.Today, "MMddyy") & "-" & recordid)
anne lewis
|
|
|
|
|
Hmmm... My answers depend on how the recordID is generated. I'm assuming it's based on an auto incrementing number.
Three suggestions for different scenarios -
1. If there's only one user accessing the database you could probably write code to logically "guess" what the record ID would be. If the record ID is auto incremented then this would probably work really well though it's bad practice.
2. If there's a number of concurrent users accessing the database then you could save the record, query the database to get the new record ID & update that field saving it back to the database. That seems like too much work though, doesn't it? At least you'll be sure that you've got the right data.
3. If you're using an SQL database I think (but unsure) you could write a trigger for the record ID to be inserted once the record is saved.
|
|
|
|
|
the recordid is already being generated. I want to query for the id that was just created and update the documentnumber with that number.
|
|
|
|
|
|
what is the exact sql statement?
|
|
|
|
|
Get the id of the last record from the database. Depending on the database you use different functions:
MS SQL: scope_identity()
Access: @@identity
MySQL: last_insert_id()
Example:
"select scope_identity() as LastId"
---
b { font-weight: normal; }
|
|
|
|
|
i've taken a student placement in a marketing company as the IT specialist. Which would have been a nice challenge if it werent for the fact that they want a complete revamp of there inhouse software to minimize data input.
I have never used delphi before so i am looking for some good sources as teaching aid. So if anybody knows of any website / ebook that i could use could you let me know,
thank you
Nx
to err is to be human but to really foul things up you need a computer!
|
|
|
|
|
Delphi is now a minority language. www.borland.com[^] are the makers of it and information and tutorials should be available including some downloadable "personal" versions of their offerings.
However, for a beginner tutorial look here http://www.marcocantu.com/edelphi[^]
modified 1-Aug-19 21:02pm.
|
|
|
|
|
thank you very much, this has been a HUGE help.
to err is to be human but to really foul things up you need a computer!
|
|
|
|
|
Hi Members
Is there any way available in VB.net through which I get the list of windows users only that doesn't include applications users like SQLDebugger, ASPNet etc.
Thanks in advance
Regards
Ali Raza
|
|
|
|
|
There's no way to tell the difference between the two. Those are actual user accounts that those services use to login to Windows. There's nothing special about them to differentiate between those and a flesh and blood user.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am try to write a Gnutella client in Vb.net and have hit a road bump. According to the interfaces GetHostIP (Isearch.GetHostIp) which uses the Variables ResultID, HostID, SearchID returns 4 bytes representing the hosts IP.
I have tried converting this to a Int32 using Converto.Int32 but I can never get any actual information all I get is 0.
Can anyone help with getting a Uint32 value to display in VB.net ultimately it will be displayed in a listview.
Cheers in Advance
0pius
|
|
|
|
|
If it's an IP address, wouldn't you want to convert every 8 bits into a number between 0 and 255 ? Have you checked the value you're trying to convert to see what's in it ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian,
Thanks for your reply.
Having never done this (recieved an uint32 or an IP address) could you point me in the right direction.
Should I put it into an array, and then reference each byte.
|
|
|
|
|
You can use bit masking and bit shifting to get your four bytes out.
For example:
uint x = 348524; // whatever
byte b1 = (x>>24);
byte b2 = (x>>16) & 0xFF;
byte b3 = (x>>8) & 0xFF;
byte b3 =x & 0xFF;
That's off the cuff, but it should work.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
An application has two textboxes on it, on positioned above the other. As each character is entered into the upper textbox, the string that has been entered into the upper textbox must appear in the lower textbox, but in reverse. WOW, HOW WOULD THAT CODE LOOK LIKE, ANYBODY HAS ANY EXAMPLES.
BUT IF THATS NOT ENOUGH THEN...If the input field contains any digits (0 through 9), each such digit must be translated into its corresponding English name reading in correct left-to-right order, followed by a space character. For example, if the string that has been entered into the upper textbox is “abc123def” the string displayed in the lower textbox must be “fedThree Two One cba”. HOW CAN I DO THIS WITHOUT THE USE OFANY STRING REVERSAL FUNCTIONS... ANY EXAMPLES WOULD SURE BE APPRECIATED.
THANKS
|
|
|
|
|
Sounds like a pretty standard homework assignment. When you're doing your own homework, if you get stuck, feel free to ask for help here. Generally, this site is great if you're willing to try it for yourself, and post some code/meaningful questions when you get stuck.
Things don't often end well when people ask for a stranger to do their homework for them.
MotorMaxDrive wrote: HOW CAN I DO THIS WITHOUT THE USE OFANY STRING REVERSAL FUNCTIONS
Well, you need a string reversal function, I suspect what your teacher means is that you need to write your own, any APIs that do this would miss the point ( which is for you to learn something )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
In addition to what Christian said, a helpful pointer in solving this is to think about it in 2 sections. Often larger projects need to be cut down into managable pieces.
1) A system to reverse a string directly. enter "abc" and its outputs "cba"
2) A system to turn numerical entry into their associated words (1=one, 2=two)
These two sections can then be combined (probably by a third class) to fuflil the overall goal.
|
|
|
|
|
For Each foundfile As String In System.IO.Directory.GetFiles("E:\StockTestData")
lstDisplay.Items.Add(foundfile)
Next
The above code reads the directory stocktestdata and then prints all the file names with the directory information to a listbox.
What I would like it to do is add just the file names to an array (just the file names without the directory info).
Anyone have any reading?
Thanks.
George
|
|
|
|
|
Path.GetFilename is what you need to get just the filename from each foundfile.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Let say I've got a class MyGenericClass(Of T). This class contains a property GenericProperty(Of T).
I further got a class MyClass.
Let's create an instance of the generic class:
Dim genericInstance as New MyGenericClass(Of MyClass)
and fill the property with an instance of MyClass:
Dim myInstanceOfSomething as New MyClass
genericInstance.GenericProperty=myInstanceOfSomething
Now I got a non generic function (I can't use a generic function for certain reasons):
Public Function MyFunction(ByRef input as Object) as Object
Within this function I want to "unwrap" the "property object" and return it like
Dim myUnwrappedProperty as Object = MyFunction(ByRef input as Object)
Now I could find out the type of myUnwrappedProperty by reflection and cast it back to MyClass.
MyClass is just a "placeholder" and could be always different (if necessary I could derive all of them from one base class or implement an interface)!
I need a real reference to myInstanceOfSomething because I want to add an event handler to it!
Any idea out there?
Thankz in advance!
|
|
|
|
|
I have a web service that feeds my Windows application when the network is down and for the life of me, I can't get this damn thing to work. Error:
<br />
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: Unable to generate a temporary class (result=1).<br />
error CS2001: Source file 'C:\WINNT\TEMP\-7n_vwzf.0.cs' could not be found<br />
error CS2008: No inputs specified<br />
<br />
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, CompilerParameters parameters, Evidence evidence)<br />
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, CompilerParameters parameters, Assembly assembly, Hashtable assemblies)<br />
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)<br />
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Evidence evidence)<br />
at System.Web.Services.Protocols.SoapServerType..ctor(Type type, WebServiceProtocols protocolsSupported)<br />
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()<br />
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)<br />
--- End of inner exception stack trace ---<br />
I'm not sure on what to post to get the answers I need. This is my first attempt with web services.
Any and all help will be greatly appreciated
|
|
|
|
|
One of ASP.NET's little quirks, you need to give the ASP.NET Machine Account (Usually ASPNET) write access to the Temp folder in the Windows directory.
I believe it needs this to compile classes used for serialising the SOAP requests.
|
|
|
|