|
If u r using MS-Access
this kind of connection string is required
dim connectionstring as string=
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\servername\d\database.mdb"
|
|
|
|
|
How can i get servername, if someone change server name it will automatic change, what does "d" stand for?
-- modified at 4:24 Thursday 17th May, 2007
-- modified at 4:29 Thursday 17th May, 2007
................
|
|
|
|
|
Sir,
d is the drive name (d drive) it was merely considered for an example basis.
if somebody changes the serve name then change the connection string.
simple!!!
|
|
|
|
|
How come, whether the application is installed on client machine, I want to change it automatically.
................
|
|
|
|
|
sorry i am not getting u.Can u please explain?
|
|
|
|
|
I mean that i had a app and installed on client machine with network group, in app i used the server name. Example "Socheat". if you someone change server name it will automatically change so, how can i do? beside not rename server name
................
|
|
|
|
|
I mean that my app is installed on client machine with the server name "SOCHEAT", if someone change server name, i would like it change automatically.
................
|
|
|
|
|
do one thing
create an extra form
invoke three textboxes there
1 for location where the database is located
2 for the username
3 for password
whenever u want to change these terms , pass there parameters to the connection string.
Simple !!!!!!!!!!!!
|
|
|
|
|
Give me an example if u can
................
|
|
|
|
|
if u know the functions , u can do it pretty easily.
|
|
|
|
|
Sorry to disturb you again, the connection string with the server name it will define whether found network or not?
................
|
|
|
|
|
Hi,
I have a drive called "Games".
How can i get that label in vb.net? (volume label?)
Thanks in regard,
--Zaegra--
|
|
|
|
|
For Each str As System.IO.DriveInfo In DriveInfo.GetDrives()<br />
MessageBox.Show(str.VolumeLabel)<br />
Next
|
|
|
|
|
Set a reference to Microsoft Scripting Runtime (COM)
Add
Imports Script
Then:
Dim fso as New FileSystemObject
Dim drv as Drive
drv=fso.GetDrive("C")
MessageBox.Show ("Volume: " & drv.VolumeName)
Vuyiswa
|
|
|
|
|
Thanks 
|
|
|
|
|
Hi,
I have a drive called "Games". How can I get this in vb.net? I have tried the following:
Dim attr As FileAttribute = Microsoft.VisualBasic.GetAttr("D:\")
Dim str as string = attr.ToString()
labProg.text = attr
It does not work
Does anyone know how to get the label of a drive?
Thanks in regard,
--Zaegra--
|
|
|
|
|
|
Hi there
i have two forms named form1 and form2 two class files named class1.vb , class2.vb
now in class1 the code is as follows
class class1
protected overrides sub Finalize()
mybase.Finalize
End Sub
end class
class2 code is as follows
class class2
protected overrides sub Finalize()
mybase.Finalize
End Sub
end class
In form1 i am writing the following code
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dim d1 as new form2
d1.show
End Sub
End Class
In form2 i am writing the following code
Public Class Form2
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dim d1 as new class1
End Sub
End Class
The startup page is form1
At form1 loads i am getting form2 automatically.
now i am closing the form2 .
Now
at the form2 closing event i am writing the following code.
GC.Collect
even this is not realeasing the class2 object memory.
Why is this happening?
I know ............
The Finalize method does not run when the object goes out of
scope. At that point, the object is simply not used any more but
the program doesn't destroy it.
Instead the program just ignores it until it starts to run out of
memory and it needs to perform garbage collection. Then it scans
all of the objects that the program has been using and
determines which ones are no longer in use. Only then does it
call the object's Finalize method
|
|
|
|
|
Nilish wrote: GC.Collect
NEVER do that. You have no reason to, you're just fighting the system and slowing it down.
Nilish wrote: protected overrides sub Finalize()
mybase.Finalize
End Sub
This code is obviously worthless, unless you have it just to set a breakpoint.
Forms are also special. The system likes to just hide them rather than dispose of them. Again, the framework is pursuing strategies to maximise performance, which is why you should just let it do it's thing.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
My (simplified) explaination on .NET Memory mangement should be another one for that FAQ...
|
|
|
|
|
Nilish wrote: even this is not realeasing the class2 object memory.
Why is this happening?
This depends on where you're getting your memory information from. If it's Task Manager, you're making the typical newbie mistake.
Managed Code (.NET CLR) applications run in a virtual machine, just like Java does. The application makes memory allocations and gets them filled by the CLR Memory Manager, which maintains a Managed Heap. This heap is reserved by the CLR, even though your application isn't using the entire heap, it's still allocated to a process as far as Windows, and Task Manager, is concerned.
When your code allocates on object, the request goes to the CLR Memory Manager. If there is sufficient free memory in the Managed Heap, the object is allocated out of that Heap. If not, the Memory Managed requests a block of memory from Windows and adds it to the Heap, THEN allocated your object out of the newly expanded Managed Heap.
If Windows wants some memory back, it just tells the CLR Memory Managed and it'll free up whatever it can that isn't being used.
This is what you're seeing in Task Manager. You're not seeing the actual memory your application is using. You're seeing what the CLR has reserved for your application.
If you want to see the actual memory use, you'll have to use Performance Monitor and the .NET CLR memory counters to the real numbers.
|
|
|
|
|
i want to know source code to convert the wav File to MP3 File in vb.net. Thank you for your kindness!!
fujiwara
|
|
|
|
|
|
Does anyone know of a way to make a modal dialog that will lock the system until the dialog has been dismised?
Thanks for any help
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|