|
Okay, so I can connect to my locally running MSSQL database with VB.Net, not a problem. However, what if I would like to deploy this program to other machines, and still wish for them to be able to connect with my DB? Is this possible? Thanks for any help in advance.
|
|
|
|
|
DHalo wrote: However, what if I would like to deploy this program to other machines, and still wish for them to be able to connect with my DB? Is this possible?
yes, it is possible.
try google search. You can get a lot of link
|
|
|
|
|
Well I've figured out that I need to use ODBC, but I'm not sure how to format the connection string to look at an IP or the like...
|
|
|
|
|
You should be able to use ADO.Net, and the SqlClient namespace classes to do what you want. I would only use the ado.net odbc provider if you think you might someday change to a different database engine. In any case, connection strings for either can be found here[^]
|
|
|
|
|
That was helpful, thanks. I did eventually figure it out. I had to enable TCP/IP connections from external networks and open some ports, but now its working. Thanks!
|
|
|
|
|
say i want to slow down my computer to eventually kill it. in a slow way i wud like to create a buffer overflow how can i do this by coding it in vb??
|
|
|
|
|
In light of your other question, noone is going to help you do this. On top of that, just creating a buffer overrun does NOT slow down the machine.
moneyque wrote: i want to slow down my computer to eventually kill it.
Wouldn't it be more efficient to open the case and drop a brick on the motherboard? Please, try it and tell us what the results were!
|
|
|
|
|
im doing a research project and i am making a virus/bacteria that will have time bomb attach to it, this will signify the incubation period. after the time has passed i want to start deleting .dll and temp files. can anyone help because i have no clue where or how to start.
|
|
|
|
|
moneyque wrote: i am making a virus
moneyque wrote: i want to start deleting .dll and temp files.
You're truely an idiot. Do you really think anyone around here is going to help you write a virus?? Did you know that in the United States, doing so is a federal crime??
moneyque wrote: can anyone help because i have no clue where or how to start.
Thankfully, this is true. Hopefully, it'll stay that way!
|
|
|
|
|
That was awesome, the best I have seen here
|
|
|
|
|
What Dave said, +
Aiding someone in a crime, makes you partially responsible. Here in the Netherlands you can get up to four years in prison, just for giving a helpful answer to this post.
moneyque wrote: research project
It's not funded research?
I are troll
|
|
|
|
|
That was really helpful. Many thanks.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
You're welcome, off course
I are troll
|
|
|
|
|
Hi,
I am working with IMAPI2 and IMAPI2FS to burn a cd or a dvd. The sample code is shown below. I want to show a progress bar to user during cd burning. However datawriter is writing the whole image file at once. How could I generate a progress bar to show to user while it is burning?
<br />
<br />
Public Sub HellBurnIt()<br />
<br />
Dim Index As Int32 = Nothing '**<br />
Dim Recorder As New IMAPI2.MsftDiscRecorder2<br />
Dim Stream As Stream = Nothing<br />
<br />
ProgressBar3.Value = DriverSize<br />
ProgressBar1.Value = DriverFreeSpace<br />
<br />
<br />
'Here we dump all selected files under a temporary directory<br />
'<br />
Dim GetFolderPath As String = TransferFilesToTemp()<br />
<br />
Index = DriverNo ' x numbered drive on the system<br />
<br />
'Create a DiscMaster2 object to connect to optical drives.<br />
<br />
Dim G_DiscMaster As New IMAPI2.MsftDiscMaster2<br />
<br />
'Create a DiscRecorder object for the specified burning device.<br />
<br />
Dim UniqueID As Int32 = Nothing<br />
<br />
UniqueID = g_DiscMaster.Item(Index)<br />
Recorder.InitializeDiscRecorder(UniqueID)<br />
<br />
'Create an image stream for a specified directory.<br />
<br />
Dim FSI As New IMAPI2FS.MsftFileSystemImage<br />
Dim Dir As IMAPI2FS.FsiDirectoryItem = FSI.Root<br />
<br />
'Create the new disc format and set the recorder<br />
<br />
Dim DataWriter As New IMAPI2.MsftDiscFormat2Data<br />
DataWriter.Recorder = Recorder<br />
DataWriter.ClientName = TextBox1.Text<br />
<br />
FSI.FreeMediaBlocks = DataWriter.FreeSectorsOnMedia<br />
FSI.FileSystemsToCreate = FsiFileSystemISO9660<br />
FSI.VolumeName = TextBox1.Text<br />
<br />
' Add the directory and its contents to the file system <br />
Dir.AddTree(GetFolderPath, False)<br />
<br />
'Create an image from the file system<br />
'<br />
Dim Result As IMAPI2FS.FileSystemImageResult = FSI.CreateResultImage()<br />
<br />
Stream = Result.ImageStream<br />
<br />
DataWriter.Write(Stream) ' Here data writer writes the whole image <br />
<br />
End Sub<br />
<br />
<br />
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
I've never used the IMAPI2 classes, but from a quick scan of the documentation, you'd have to create an event handler for the IMAPI2.MsftDiscFormat2Data.Update event and wire it up with AddHandler.
|
|
|
|
|
i downloaded a thermometer panel but i cant figure out how to get it into visual basic. there are some files from the download but vb wont open some, what do i do
|
|
|
|
|
Send a message to the developer of the thermometer panel?
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
need some guidance, I have a collection of properties 166 to be spacific, each object in the collection will spawn a thread to perform a long running task, I also want to pump meessages back to the calling thread. threadpool will provide me the solution unfortunatly MS has limited the number of threads to 25 per processor, simple math will tell me that I need a huge box.
so that another approach would be to loop from 0 to max threadpool and spawn an instance of a thread pulling the objectid from the collection based on the threadid. that's fine or the first 50 objects. how would I now pull the remaing objects from the collection.
example
for i as 0 to threadpool.maxthreads -1
dim node as basenode = basecollection(i)
dim rem as new workernode(node)
addhandler rem.messageback new messagehandler(addressof OnMessagesReceived)
rem.dowork
next
assuming dual CPU will make the maxthread value be 50 and my basecollection will hold 166 objects
I am stuck spawning objects 51-165
|
|
|
|
|
With .NET 2.0 SP1, the default was changed from 25 threads per core to 250. This is not to say that using 250 is a good design. Seriously, if you think you need more than 25 threads per core running, you really need to reconsider your design. You'll be wasting so much time in context switching, it's silly.
Also, the ThreadPool throttles it's new thread creation to 2 per second once the thread count exceeds the number of cores running the threads. So, on a single core machine, it'll still take well over a minute to create all of your threads.
Now, having said all that, you can't change the MaxThreadPoolThreads limit in managed code.
|
|
|
|
|
this is good to hear, even though the collection will hold 165 objects, it's unlikly I will actualy spawn all 165 threads at once, each object will represent a pop3 client, that will pop a mailbox return all it's mail perform some formating, auto alerting and store the results in a DB then die. the reason for spawing as many as possible at once is reduce the time between poping, also the reason for passing messages back is for the management interface to watch activity through ipclient....
|
|
|
|
|
Hi All,
After A long time.. Hope u all are good..
I am having btnUpload and btnTransfer. On btnUpload I open a openFileDialogue select any type of file and at transfer i want to transfer it to another location suppose D:\TransferTest\.
But its giving this error Could not find a part of the path 'D:\TransferTest\'.
The code is as below :
Dim filename As String
Dim ofd As OpenFileDialog
Private Sub btnUpload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpload.Click
ofd = New OpenFileDialog()
ofd.Filter = "All Files|*.*"
ofd.ShowDialog()
If ofd.ShowDialog() = Windows.Forms.DialogResult.OK Then
filename = ofd.FileName()
txtFile.Text = filename
End If
End Sub
Private Sub btnTransfer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTransfer.Click
File.Copy(filename, "D:\TransferTest\")
End Sub
Help with a code tip... its a urgent..
Regards,
Sourabh
Thanks and Regards,
|
|
|
|
|
Try using the new filesystem namespace:
FileSystem.FileCopy(filename, "D:\TransferTest\")
|
|
|
|
|
Hi,
in Windows you can only create/move/copy files to existing folders, so if either D:\ or D:\TransferTest\ does not exist, you would get such error.
You should use Directory.CreateDirectory() to create a folder (no need to test for existence first!).
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Private Sub btnTransfer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTransfer.Click
if not io.directory.exists("D:\TransferTest\") then
io.directory.createdirectory("D:\Tran.....")
enf if
File.Copy(filename, "D:\TransferTest\")
End Sub
|
|
|
|
|
so far for "no need to test for existence"...
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|