|
u didnt specify user name and password in the connection string
also check the dataset1 which u r using if populating or not.
abhinav
|
|
|
|
|
Hi,
Any suggestion on efficient way for importing data from Excel to Database by program?
Many thanks and regards,
WiL
|
|
|
|
|
Do you mean XLS files, or via Excel itself ? Would you accept a solution that involves Excel being on the target machine ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I mean local XLS files. I want to browse for the XLS files, read content and then import them to my database.
Many thanks and regards,
WiL
|
|
|
|
|
OK - if you want to do this on machines that don't have Excel, I'm not sure that there's a solution beyond learning the file format, and writing code to parse it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
With regard to your email - no, I won't send you any code. You will need to write it yourself.
I don't have code to do this, what makes you think I do ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
No no no. I'm not asking for any code. I'm asking about an "efficient way" or "best practice" or etc.
Thank you
WiL
|
|
|
|
|
I apologise. Someone ELSE sent me an email that said 'please send me code for this problem'. I assumed it was you.
I don't see any terribly efficient way of doing this, unless your users all use a new enough version of Excel that they can save as XML.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks CG. Looking foward for more helps from you in future
WiL
|
|
|
|
|
hi there,
I need to access an unknown number of controls, that may be added by a user to my a usercontrol and each control must fire the same event!
i think this is the only way possible that i can do it!
for example..imagine a panel and add three buttons to it...then on each mouse enter of each button the same event is triggered, i have tried a number of ways but all failed.
please help
thanks
|
|
|
|
|
Create a single method in your code, and tie the event of each control to that method.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Or, if your adding these controls dynamically, look into AddHandler[^]. Don't forget to lookup it's opposite, RemoveHandler.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi, i have been quite busy lately due to exams at uni, but i would just like to say thanks for your advice....
The following code is exactly what i needed
Add this code and some controls to a form and on each Mouse_Enter of any control the main event is triggered..excellent
'Every control added to the form cause this event to be raised<br />
WithEvents MyDummyControl As Button<br />
Public Event MyEvent() ' Declare an event.<br />
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
Try<br />
Dim mycontrol As Control<br />
'count number of controls<br />
For x As Integer = 0 To Me.Controls.Count - 1<br />
'Associate controls<br />
mycontrol = Me.Controls.Item(x)<br />
' Associate an event handler with an event.<br />
AddHandler mycontrol.MouseEnter, New EventHandler(AddressOf TriggerMyEvent)<br />
Next<br />
RaiseEvent MyEvent() ' Raise an event.<br />
<br />
Catch MyError As Exception<br />
'dont do event<br />
End Try<br />
End Sub<br />
<br />
<br />
Private Sub TriggerMyEvent(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyDummyControl.MouseEnter<br />
<br />
End Sub
Thanks again
|
|
|
|
|
I'm a non-profit organization and I'm trying to develop a remote access desktop application either in VB 6 or VB.NET that will allow remote control of a computer, so that a tech can troubleshoot problems, similar to Netmeeting, allowing the tech to control the mouse, keyboard strokes and see the screen of the remote computer as close to real time as the Internet connection will allow. We have looked into products from other companies, but the repetative costs are too much. Any help would be greatly appreciated. If it can't be done in VB.NET or VB 6, can someone point us in a direction to go to get this done. We refurbish computers for the developmentally disabled and need remote access troubleshooting. We've looked at some of the open GNU product and it's either full of spyware or not in a language we code in currently.
Michael Bragg, President
eSolTec, Inc.
a 501(c)(3) organization
http://www.esoltec.org
|
|
|
|
|
Google around for VNC. You'll find just what you're looking for. I would suggest dropping the VB6 version though and going with VB.NET. Much easier to do with greater flexibility.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
David,
thank you for your tip, however, VNC has spyware in it and it's also written in C++ I believe. I need something in VB6 or .NET so that I'm able to edit it for use in our company.
|
|
|
|
|
As the title,
I know it can be done if using Adobe Acrobat SDK,
and SDK 5.0 is free.
But the Adobe does not provide 5.0 SDK(Win) any more...
Any good idea for the same perpose?
Thank you!
|
|
|
|
|
Do you just want to parse the contents of the PDF document, or do you want to actually render the document on a Form ?
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
In My case, I need to render the document on a form.
|
|
|
|
|
|
It sounds so good, but it is not free.
anyway, Thanks for your advice.
|
|
|
|
|
Oh, I apologize. Free. That makes it more difficult. Many libraries out there exist to create/read/convert PDF documents; however, displaying them requires a lot of work (a lorry's load, depending on how you do it). Because of that, I don't think that we'll find any free libraries to do that. I'm sorry.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
i am trying to write a character that is received from the the serial port to a textbox but the received character never shows up in the textbox. the serialdata received event handler fires and using debug you can step through the code & follow the character as it is written to textbox1.text but it never actually shows or is visible in the textbox on the form. all the serialport setup etc is done in module1 - open(), isopen(), getportnames()etc & write the returned information into textbox1 with no problems.
Public Class Form1
Public Sub MyRxData(ByVal intRxData As Integer)
Dim strAscChar As String
strAscChar = Chr(intRxData)
TextBox1.Text &= strAscChar
End Sub
End Class
Module Module1
Dim WithEvents _Rs232 As New SerialPort()
Public Sub _Rs232_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles _Rs232.DataReceived
If _Rs232.BytesToRead > 0 Then
Do
Form1.MyRxData(_Rs232.ReadByte)
If _Rs232.BytesToRead = 0 Then
Exit Do
End If
Loop
End If
End Sub
End Module
when all the code is lumped into Form1 it all works with no problems, it is only when i put all the serial port code into it's own module that the problem occurs. i have had no formal training in vb etc as i am involved in hardware design, FPGA & micros etc so i suspect i am doing something stupid or doing it in a way that it is not meant to be done, so any help & suggestions would be greatly appreciated. Thanks
|
|
|
|
|
andrewke1 wrote: TextBox1.Text &= strAscChar
Should that be += ? Have you debugged to make sure that strAscXhar is the character you want ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: Should that be += ?
&= is correct. VB uses the ampersand '&' to append strings.
|
|
|
|