|
Ain't gonna work like you want. The ExecuteComplete event will only get fired when SQL complete the BATCH of statements you sent it (remember the GO statement?), and will return the LAST record count affected, not all of them. You will either have to put up with this or send each command seperately, in your case, sending and executing each INSERT statement one at a time.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Feared as much....
Think that I'm going to have to write some sort of sql parser, and look in more detail at what is actually being sent to the server.
Thanks for the assistance!
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
help!!!
any idea on how to read excel file in vb.net? an excel file must be in database definition format... then how to generate sql script basing from that file(excel).
help! any idea? it would be of great help... Thanx a lot!
|
|
|
|
|
in the Visual Studio IDE do a search for the term "Q257819." (sans the punctuation of course) This should show you a listing of topics, the first of which is "HOWTO: Use ADO with Excel Data from Visual Basic or VBA" This should lead you in the right direction.
|
|
|
|
|
thanx for your suggestion... i'll try it.
|
|
|
|
|
Hi
I am trying to complie windows application code written in VB.net from a command line.
I am getting errors as different classes involved in the project are referencing and using the members of each other, Thus creating a circular reference.
Now to complie 1 class in an assembly, I need other class already in an assembly for referencing. but oher class can not be complied seperately because it reference this class.
If anyone has a clue, Please help out.
Thanks & Regards
Dinesh
Learning more on Dot-Net
|
|
|
|
|
You haven't submitted any code, so we really can't tell you what your doing wrong. But, if I understand you correctly, how you are trying to do this might look something like this:?
Public Class A
Dim objB As New ClassB
End Class
Public Class B
Dim objA As New ClassA
End Class
IIRC, this is not going to compile because of the circular reference you are talking about. It's just bad object designed to have two classes completely dependent on each other. You're classes should be designed so that they are self contained modules and have a one way relationship:
Public ClassA
Dim objB As New ClassB
End Class
Public ClassB
' no code dependent on class A existing here...
End Class
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi there,
when is suitable using a dictionary instead of an arraylist and wayback?
i mean, i can't retrieve an object from an arraylist using a string key, is it?
there are other difference/condition? i.e. array dimension or whatever?
thanks in advance!
fuel2run
|
|
|
|
|
If you want to use a String type key to retrieve data then you have to use a class that implements IDictionary , like a HashTable or SortedList . There are other classes, but those seem like they'll fit your needs. Anything that implements IDictionary is accessed by a key/value pair. You give it the key as a kind of index and the IDictionary will return the value associated with it.
ArrayList 's are accessed by an Index value, usually an Integer type.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
I want to send a message to another computer by writing VB!!! Who can help me???
Thanks
tramdtt
|
|
|
|
|
There are a number of ways to send "messages" to other computers. Could you be more explicit in your request. Is the message aimed at a user, an existing process/application, another application you are writing, etc.?
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
Hi, Colin Angus Mackay
Thank for your answer. But can u say more clearly? I am writing a program which send and receive files using Winsock. But i want to send a message to received computer to notice whenever a file is sent to.
Which functions can I use to send message to received computer? I write in VB6,0.
Help me
Thank
tramdtt
|
|
|
|
|
Just use a socket and sent it a simple string saying it's done. There's exhaustive information about writing sockets on the net and in the MSDN.
|
|
|
|
|
When you send the message, is there going to be a client app on the detination computer that will recieve this message? If not, you'll need one!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I use Winsock to write a app send and receive files throughout computers on LAN. I used to use SendData method to send a string to app of destination computer . But I want to send a message to notice to destination computer whenever files are delivered to destination computer.
Which functions Can I use in this situation?
Help me!
Thanks
tramdtt
|
|
|
|
|
I have a global system hook, using "dscwpmsg.dll" and an example from www.allapi.net (acording to the read me: a system wide Hook of the types "WH_CALLWNDPROC" and/or "WH_GETMESSAGE").
I want to know when the a user RIGHT clicks on the minimize (or any other) button of the control box (top right of every window).
If any one has any ideas I'd appriciate it. And before any one sais you can't (people on IRC caim it is not possible): it is possible, I have an application that does it, now I want to know how...
|
|
|
|
|
Hello..I'm new in VB.net
I have form with display button and text box.
I have myclass.
<br />
Namespace theClass<br />
<br />
<br />
' The class is named StringProcessor.<br />
Public Class myClass<br />
<br />
Public Sub printOut(ByVal t as String)<br />
<br />
MsgBox(t)<br />
End Sub<br />
End Class<br />
End Namespace<br />
Then I want to print out what the use type in so I call
printOut(Me.InputText.Text)
but I got error message like
An unhandled exception of type 'System.NullReferenceException' occurred in BrianHuang_Unit5.exe
Additional information: Object reference not set to an instance of an object.
help me how to correct it please.
|
|
|
|
|
You don't give the stack trace of the error message, so it is harder to tell WHERE it happened.
Given the code snippet you've supplied Me.InputText is the most likely culprit, if so that means you have not set it to an instance of an object. You need to instantiate Me.InputText first.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
We need to know on what line the exception occured, otherwise we really can't tell you with any accuracy what you did wrong.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
This is in form.
<br />
Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click<br />
Dim sp As Course.theClass.myApp<br />
sp.printOut(Me.InputText.Text()) ' here the error pointing to.<br />
End Sub<br />
the myApp class
<br />
Option Strict On<br />
Option Explicit On <br />
<br />
Imports System.Windows.Forms<br />
<br />
' The class module is enclose in a namespace named CountingStatement. <br />
' The root namespace was set to Course using the Project Properties dialog box. <br />
Namespace theClass<br />
<br />
' The class is named StringProcessor.<br />
Public Class myApp<br />
Public Sub printOut(ByVal theText As String)<br />
'get the total number of characters,#of Words, #of paragraph, and # of sentence in that paragraph. <br />
MsgBox (theText)<br />
End Sub<br />
End Class<br />
End Namespace<br />
It is not as easy as c++. I dont know how to call the class function from the other class in VB.net.
Thank you
|
|
|
|
|
The problem is that you delcared sp as Course.theClass.myApp, but you never instantiated it. It should be:
Dim sp As New Course.theClass.MyApp
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thank you... it works now.
|
|
|
|
|
does anyone know somewhere when they have written code to verify what users are signed onto a program.
for example. If i only want 10 users logged in at once but 100 possible users in the program. Each instance will be running on a diff pc and i cant figure out how to validate what users are logged on and limit the logged on users to 10
Vince
|
|
|
|
|
Your application would need its own licensing server. Something you would have to write from scratch and into your application. Your app would ask the user for an username and password, login into the license server, check out a license on a lease (timed) basis, say 30 minutes, and when the app quits, check with the license server to return the license. You would also have to write into the license server some kind of timeout where if the server did not hear from the client, the license would be returned to the license pool. The clients would also have to check in with the server occasionally to renew their leases. This is necessary for the simple reason an application could hang and the license would be checked out without ever being checked back in properly. Not too hard to write, but, like I said, you'd have to write it from scratch.
Oh! Then you would need a management tool to administer the license server too...
Or buy the components from a 3rd party, of which I have no idea who sells something like this...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|