|
ya its working fine now.. what u gave here is really helpful to me.
thanks a lot
K.Vijaya
|
|
|
|
|
My computer used to give me low virtual memory warning when i work in vb.net and sql server 2000 simultaneously.
Then i incresed the size of virtual mem. After that the warning didn't come again. But now it has started again.
Plz smbdy tel me the solution to this problem.
Plzzzzzzzzzz
Thanks.
Swati
|
|
|
|
|
Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelect<br />
<br />
TamakiLabs.Show()<br />
Lab131.Hide()<br />
Lab134.Hide()<br />
Lab203.Hide()<br />
<br />
If TreeView1.SelectedNode.Name = "Lab 723-131" Then<br />
Lab131.Show()<br />
ElseIf TreeView1.SelectedNode.Name = "Lab 723-134" Then<br />
Lab134.Show()<br />
Else : Lab203.Show()<br />
End If
im wanting my system to show 4 different datagridviews, yet it only shows Lab134 datagridview no matter which node i click. I dont where my code is wrong, can someone please give me a clue as to where i have my mistake in my code.
|
|
|
|
|
Hi
I am trying to write an application that can read arabix text file
but he dose not do than ????????????
i try the same code in reading english file and it success !!!!!!!!
how i can solve this problem
please help me ............................
khaleel
|
|
|
|
|
Can you be more spesific?
What type of data are you trying to extract?
Can you post a part of the code?
Isaac Sasson
"I hate it. Java sucks. And Java's generics suck harder. And in general, Java just sucks."
- David Stone, The Lounge (May 1st 2006)
|
|
|
|
|
Hi
it is an text file
code
System ::String *strData = S"" ;
System ::String *m_strFileName= S"" ;
System ::IO ::StreamReader inFile =
new System ::IO ::StreamReader( m_strFileName ) ;
strData = inFile.ReadToEnd( ) ;
|
|
|
|
|
|
Hi Everyone:
I have not been receiving any ressponses lately, but we will try again.
I’m trying an experiment in ADO database connections. I have two MS-Access 2000 databases. One is password protected, the other isn’t.
I have two functions to make connections to the database using ADO.
With login data:
Public Function Jet_Connect_Login(ByVal strProv, ByVal strDB, ByVal strUser, ByVal strPasswd) As Integer
On Error GoTo Jet_Connect_Login_Err
Set cnnMainDb = New ADODB.Connection
With cnnMainDb
.ConnectionString = "Provider=" & strProv & ";Data Source=" & strDB & _
";User ID=" & strUser & ";Password=" & strPasswd & ";"
.Open
Jet_Connect_Login = .State
End With
Jet_Connect_Login_Exit:
Exit Function
Jet_Connect_Login_Err:
Select Case Err.Number
Case adErrObjectOpen
If cnnMainDb.State = 1 Then
cnnMainDb.Close
Set cnnMainDb = Nothing
End If
Resume Jet_Connect_Login_Exit
Case Else
Msg = "Error in Startup module - Establish_Connection function. " & vbCr & _
"Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & vbCr & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext
If cnnMainDb.State = 1 Then
cnnMainDb.Close
Set cnnMainDb = Nothing
End If
Resume Jet_Connect_Login_Exit
End Select
End Function
Without login data:
Public Function Jet_Connect_Std(ByVal strProv As String, ByVal strDBName As String) As Integer
On Error GoTo Jet_Connect_Std_Err
Set cnnMainDb = New ADODB.Connection
With cnnMainDb
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBName
.Open
Jet_Connect_Std = .State
End With
Jet_Connect_Std_Exit:
Exit Function
Jet_Connect_Std_Err:
Select Case Err.Number
Case adErrObjectOpen
If cnnMainDb.State = 1 Then
cnnMainDb.Close
Set cnnMainDb = Nothing
End If
Resume Jet_Connect_Std_Exit
Case Else
Msg = "Error in Startup module - Establish_Connection function. " & vbCr & _
"Error # " & Hex(Str(Err.Number)) & " was generated by " _
& Err.Source & vbCr & Err.Description
MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext
If cnnMainDb.State = 1 Then
cnnMainDb.Close
Set cnnMainDb = Nothing
End If
Resume Jet_Connect_Std_Exit
End Select
End Function
The Connection function without the logon works fine, but the one requiring log on information is giving me the following error:
Error in Startup module – Establish_Connect function.
Error# -2147217843 was generated by Microsoft JET Database engine.
Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
Thank you,
Quecumber256
|
|
|
|
|
Hi, does anyone out there know how to create a new class that inherits form System.ComponentModel.Design.CollectionEditor.CollectionForm? I've checked online and it seems that this can be done in C#, but I can't find any resources out there that explain how to inherit this class in vb.net. Thank you in advance.
C#:
public class MyCollectionEditor : CollectionEditor
{
protected class MyCollectionForm : CollecitonEditor.CollectionForm
{
}
}
VB.Net - Does not work, error msg:
"System.ComponentModel.Design.collectioneditor.collectionform is not accessible in this context because it is 'Protected'"
public class MyCollectionEditor
inherits CollectionEditor
protected class MyCollectionForm
inherits CollecitonEditor.CollectionForm
end class
end class
eatwork
|
|
|
|
|
You can start with this:
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Data
Imports System.ComponentModel.Design ' Important!!
Imports System.Windows.Forms ' Important!!
Public Class MyCollectionEditor
Inherits CollectionEditor
Public Sub New(ByVal type As Type)
MyBase.New(type)
End Sub
.
.
.
Private Class MyCollectionEditorForm
Inherits CollectionForm
Public Sub New(ByVal editor As CollectionEditor)
MyBase.New(editor)
.
. ' setup other form properties...
.
End Sub
Public Sub New(ByVal type As Type)
MyBase.New(type)
End Sub
Protected Overrides Function CreateCollectionForm() As CollectionForm
Return New MyCollectionEditorForm(Me)
End Function
End Class
End Class
I strongly suggest picking up Lutz Roeder's .NET Reflector and examine some existing collection editors before continuing. Also, I'd keep the MSDN documentation for CollectionBase, CollectionEditor, and CollectionEditor.CollectionForm bookmarked.
Keep in mind, that CollectionForm is just a normal Windows Forms Form. I wonder what you can do with that little tidbit...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello Dave,
Thank you for your reply, I will check out Lutz Roeders .NET reflector, and it seems as though all of the other collection editors available online are done through C#. But, I will continue the search online.
I tried your starter code, but I still have the same problem. Visual Studio 2003 does not recognize:
Private Class MyCollectionEditorForm
Inherits CollectionForm
because it says that it is protected. I was also not able to load the System.Collections.Generic library. Any ideas on why this is happening? is it because I don't have the generic library imported? Thanks
eatwork
|
|
|
|
|
That's beause I'm using 2005, not 2003.
They may have changed the CollectionForm protection between .NET 1.x and 2.0.
There is, also, no System.Collections.Generic namespace in .NET 1.x, so you don't have to include it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks for your quick response dave. You wouldn't happen to know how to get around the protection problems with the CollectionForm in VS2003 would you? Thank you.
eatwork
|
|
|
|
|
hi,
I have to capture the keypress using the windows service. I have to store all the pressed values into database. Please help me to do this
Ramesh
|
|
|
|
|
Is there a way to modify the routing table from VB.Net or C#? I can get the IP address of a VPN connection on my computer but need to add an entry to the routing table to access the VPN.
Thx
Mark Jackson
|
|
|
|
|
You should not have to do this at all. If the VPN client is configured correctly, it handles this itself.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Unfortunately there is no VPN client, only a new IP address. I found the GetIpAddrTable call and GetIpForwardTable call from the old SDK so I will build something around that.
Thx
Mark Jackson
|
|
|
|
|
mjackson11 wrote: Unfortunately there is no VPN client, only a new IP address
Who on earth does this anymore? Talk about the hard way...
Instead of writing an app and P/Invoking all kinds of crap, why not just write a little wrapper around the ROUTE command line utility? At least then, it's easily tested.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
lol, that would be too easy.
Dave Kreskowiak wrote: Who on earth does this anymore? Talk about the hard way...
Instead of writing an app and P/Invoking all kinds of crap, why not just write a little wrapper around the ROUTE command line utility? At least then, it's easily tested.
|
|
|
|
|
Really, how much effort do you want to put into something so innocuous?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
This is in VB for Access, I don't know if it works the same in VB.NET.
I have a datasheet on a form who's datasource is a disconnected ADO recordset. I created the recordset in the form's open event method. It displays everything properly and I can delete/edit records but I adding them is broken. For example the datasheet last line is
ID SYMBOL DESCRIPTION
164 VM PJM OFF PEAK
When I go to line 165 and try to type in:
165 XXX TEST
It adds ten blank records to the dataset. Is there something I am missing about adding and editing record sets. Sorry but my prior experience is C++ financial so I don't know much about interfaces.
Thx
Mark Jackson
<----- Code here ----->
qStr = "SELECT Symbol, Legend FROM SymbolKey WHERE Symbol IS NOT NULL ORDER BY Symbol"
dbRS.Open qStr, dbConn, adOpenKeyset, adLockOptimistic
Set formRS = New ADODB.Recordset
formRS.Fields.Append "myID", adInteger, 8, adFldUpdatable
formRS.Fields.Append "Symbol", adChar, 10, adFldUpdatable
formRS.Fields.Append "Legend", adChar, 255, adFldUpdatable
formRS.Open , , adOpenDynamic, adLockOptimistic
i = 0
Do Until dbRS.EOF
formRS.AddNew
formRS.Fields("myID").Value = i
formRS.Fields("Symbol").Value = dbRS.Fields("Symbol").Value
formRS.Fields("Legend").Value = dbRS.Fields("Legend").Value
i = i + 1
dbRS.MoveNext
Loop
Set Me.Recordset = formRS
dbRS.Close
Set dbRS = Nothing
|
|
|
|
|
Access doesn't work anywhere near like VB.NET does...
This code is enumerating through a recordset, formRS , and creating a new record in the recordset for each and every existing record in the recordset!?!?!? Why?????
You'd be much better off on a board that supports Office products or Access. From what little code is here and your description, you wouldn't even need any code to do this in Access. Just create a new form that binds a result set from a query that returns the same data.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I will try to find a better board for it. This is just a single table db to test. In the real db, the record set will pull data about accounts, post it to a form where users can add/delete/change records. I don't want the changes the user makes to be saved anywhere. When the form is closed, the Recordset is read and results written to a file.
I can use temporary tables but I have had a lot of problems with Access crashing with multiple users in that instance.
Thx
Mark Jackson
|
|
|
|
|
WHAT IS DATAGRID? EXPLAIN WITH SOME EXAMPLE PROGRAM
sdgsdfsdfsdfsdfsdfsdfsdfsdfsdfsdf
|
|
|
|
|
First of all, STOP YELLING! You just gave the impression that you burst into a room, screamed a bunch of demands (with examples), and everyone in the room just stared at you in total silence.
A datagrid lets you view in table form, the data in a bound data source. DataGrid[^] class.
For examples, all you have to do is Google for "windows forms datagrid vb.net" and you'll come up with thousands upon thousands of hits.
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 11:35 Friday 5th May, 2006
|
|
|
|