|
Catch ex As COMException
How can i clear my Exception ? ex.Clear ?
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
You don't have to clear the exception, you have caught it.
Exceptions doesn't work the same way as the Err object did. When there is an error an exception object is created, and the error state is contained within that object. There is no ever-present global object that you have to clear.
---
b { font-weight: normal; }
|
|
|
|
|
Hi Everyone,
Appreciate if anyone can post the code equivalent of
iFileNum = FreeFile()
open FileFullPath For Input As #iFileNum
sFileContents = Input(LOF(iFileNum), #iFileNum)
Close(#iFileNum)
in VB.NET
Thanks,
K
|
|
|
|
|
I have no idea what most of this does ( what does FreeFile return ? What does it do ? ), but the System.IO namespace has File, Directory and Path classes with static methods to perform all sorts of file operations. VB2005 also has My.FileSystem as shortcuts to all sorts of stuff.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Do a file.open and then say ReadToEnd, then do a file.close.
Pablo
|
|
|
|
|
I'm looking for way to read delimited text file into a
dataset.
i read many articls but that does not help me on how to create the connection string and how to tell the connection that the fields are Separated by colons or any something else
any suggestions, please ??
Tamimi - Code
|
|
|
|
|
refer this site connectionstring.com
this will help u out
chandru
|
|
|
|
|
I have 3 class and build it to 3 dll file, when i build my project i need to join 3 dll file and 1 file exe, please help me, thanks
kevil
|
|
|
|
|
You cannot turn 3 dlls into an exe. If you're using Vb.NET, you can certainly import the dlls very easily and use them in yuor code, but you will still have dlls you need to ship with your exe.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i need code to use throught my application (vb.net 2003) with sql server 2000 to make backup for data base every time i close application and another code to restore database when reinstall application (all that during application the user didn't use enteripse manger or query analayzer)
ma_refay
|
|
|
|
|
i create setup package for my application i used setup wizard projects in vb.net 2003 i need to add sql engine into my setup package and this setup run automatic during setup installation
ma_refay
|
|
|
|
|
i want to add first column of datagrid as checkedbox against every row of datagrid. then from the list i will select some checkboxes according to need.how i will implement this thing plz tell me any simple way.
reply soon.
|
|
|
|
|
Hello everyone, I am very new to VB.net (and programming for that matter) and I am trying to get a handle on it. I am trying to understand datasets, data grid, data adapter, data connection and how they all work together. I have found a few tutorials that helped a little but most have been for VB.net to an SQL database and I am trying to use this with an Access 2003 database not SQL. Does anyone know of any good tutorials that explains this with an Access DB? I am sure I will have tons more questions. I appreciate any help that you can offer to me.
I can give more specific information about what I am trying to do but at this point I think would be best if I learned more about the process rather than waste your time trying to teach me.
|
|
|
|
|
|
You can use most of the tutorials for the SQL Server database with very small changes.
What differs is the connections string, and the name of the classes that you use. For an example you use OleDbConnection instead of SqlConnection and OleDbCommand instead of SqlCommand, but they work almost exactly the same. You have to get to much more advanced stuff before ever seeing any difference at all, apart from the connection string and the naming of the classes.
You can get examples of connectionstring on connectionstrings.com[^].
---
b { font-weight: normal; }
|
|
|
|
|
I am having a sudden problem in VS 2005 with Resizing my controls in a windows form. I can not resize any controls. I can move them but not resize them. I rebooted my machine but I stil can not resize anything. I do not reall any unusal events. Does any one have any ideas.
It only seems to one particular Project.
Thanks
-- modified at 10:43 Saturday 26th August, 2006
|
|
|
|
|
Following code is working.But want to change the keycode.
In vb6 keycode=0 was working.How do it in VB.NET.Can anybody help me.
Private Sub text1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles text1.KeyUp
If e.KeyCode = 13 And btnstat = 1 Then
MsgBox(e.KeyCode)
End If
End Sub
|
|
|
|
|
Do you mean somthing like sending a tab, instead of a carriage return?
Private Sub TextBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp
If e.KeyCode = Keys.Return And btnstat = 1 Then
SendKeys.Send("{TAB}")
End If
End Sub
|
|
|
|
|
I have to program a scenario like this.
I have the cluster server and the user running the service.
I need to query if the user is a member of a group xxxx on the nodes.
On the node say NODE1,
Group - xxxx has the below members
--TEST1\Domain Admins -- (again a group named 'Domain Admins'
in TEST1 domain)
--TEST1\Admin -- (user called Admin in TEST1 domain)
>From cluster machine, I connect to "NODE1" using wmi. The below two
queries succeed.
a.SELECT * FROM Win32_GroupUser WHERE GroupComponent =
"Win32_Group.Domain='NODE1',Name='Domain Admins'"
b.SELECT * FROM Win32_UserAccount WHERE Domain='NODE1' and
Name='Administrator'
But the below two queries fail. These are similar to a and b but with
different domain "TEST1".
My program fail even though Group xxxx has TEST1\Domain Admins.
c.SELECT * FROM Win32_GroupUser WHERE GroupComponent =
"Win32_Group.Domain='TEST1',Name='Domain Admins'"
d.SELECT * FROM Win32_UserAccount WHERE Domain='TEST1' and
Name='Administrator'
Even wbemtest.exe succeed for a and b queries but fail for c and d from
the cluster server.
But when I run wbemtest.exe on the "NODE1" directly then all the
queries succeed.
How do I make wmi queries succeed for different domains from the remote
computer?
I need to write a VB.Net program for this. I will be adding this code
to existing VB.Net application.
|
|
|
|
|
First of all, let me state that I am new to multithreading.
I am working on a project that makes constant queries to a network device via a tcp connection.
These queries can generally take about a third to a half a second to complete.
As it stands I am creating several (4-5) separate threads that loop and make queries then report the result data to my main thread. Each thread maintains it's own tcp connection to the device.
Each of the threads is set to sleep for an entire second each loop cycle, each of the threads is set to lowest priority.
Yet CPU usage is through the roof. And i'm using a modern 3+ ghz machine. Why is my application eating up so much CPU time?
Is there a cure for this, am I doing something wrong?
Please help.
-- modified at 19:01 Friday 25th August, 2006
|
|
|
|
|
Fixed.
Problem had nothing to do with multithreading. Code was getting stuck in a while loop. My own dumb fault. A single call to System.Threading.Thread.Sleep inside the while loop brought CPU usage down from 85-100% to 12-18%.
|
|
|
|
|
Hi,
I want to get results from a database, and then add some more info to that, and write all of that info to a text file on the local client 'C drive'. Anyone that knows how to help me?
|
|
|
|
|
Didn't I answer this the other day ?
Getting data from a database is well documented. I assume if you have a DB, you must know how to do this.
To write info to a text file, it's something like My.FileSystem.WriteAllText.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: Didn't I answer this the other day ?
I am not to sure. I have been having problems with internet and code the last few weeks, but it feels like I am getting on top of things again.
Christian Graus wrote: To write info to a text file, it's something like My.FileSystem.WriteAllText.
Ok, excellent, will check the help files for info on this.
|
|
|
|
|
Please tell me how can add text in grid in particular row,col format.Like using textmatrix in vb for adding text.
|
|
|
|