|
Does anyone know how I can reset the identifier seed in an sql table back to 1, using vb .net?
I have to transfer data from an access database, and I need to clear out the sql server table before the transfer.
Thanks
David Loring
!! Keep Music Live !!
|
|
|
|
|
You just need to RESEED[^] it.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
Sir,
Whil;e I'm using your currecytoword function when I try to convert 1 it will display one thousand one.Please help me to rectify this problem
With regards
hashim
|
|
|
|
|
Can you post the snippet of code your using that gives you the undesired result?
|
|
|
|
|
1 - everything on this forum is a question or an answer, try a more descriptive header
2 - there is no one person you're addressing here, this is a public forum. If you found the function you're referring to in an article, that article has it's own forum where you can address it's author directly. We have no idea what you're talkng about.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Hi!
I have two files, "./main.exe" and "./d/code.dll" using a third file, common.dll, as a reference. VS creates two of this latest in the two directories. How can I make main.exe to use the "./d/common.dll" instead of "./common.dll"? All 3 projects are VB.NET2005
Thanks for your help
Thomas Szekeres
|
|
|
|
|
Remove the references, recreate a new reference to the dll, compile, voila. That should take of it.
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
|
|
|
|
|
no, it doesn't. both project's copy local property stays true by default, so it copies itself, and if I remove either dll, the whole thing collapses. If I turn one of the copy local to false, it's all the same.
Let me rephrase this... Let's take an exe project, and an already compiled "common.dll". I create a reference in the project for the dll file. What else do I have to set in the project's properties to force it to look for that given dll at "./dir/common.dll" instead of "./common.dll", relative to the exe file's location?
-- modified at 16:12 Saturday 23rd June, 2007
|
|
|
|
|
i was populating the treeview with the hard drives items.
For that i am using the following code under the TreeView1_AfterExpand method
If (e.Action = TreeViewAction.Unknown) Then<br />
Exit Sub<br />
End If<br />
If (e.Node.Nodes.Count > 0) Then<br />
e.Node.Nodes.Clear()<br />
End If<br />
Dim dirinfo() As String = Directory.GetDirectories(e.Node.Text)<br />
For count As Integer = 0 To dirinfo.Length - 1<br />
Dim dir As New DirectoryInfo(dirinfo(count))<br />
If (dir.Attributes = FileAttributes.Directory Or dir.Attributes = 17) Then<br />
e.Node.Nodes.Add(dir.Name)<br />
End If<br />
dir = Nothing<br />
Next
can i improve the code.
i am asking for the improvement because to the speed limitations.
i think there is some unuseful code which i am writing.
|
|
|
|
|
The code you've got will work about as fast as anything else. The problem is the disk I/O speed and the number of nodes you have to add to the treeview. There's really nothing you can do to speed this up, unless you populate the entire tree on your apps startup. This will greatly increase your apps startup time and limit its flexibility to adapting to changes in the file system during the execution of your app.
|
|
|
|
|
Hello,
How can I read and/or write direcly to a specified sector in the HDD ?
I need something like
"read(clusterNum, sectorNum, dataToRead)"
"write(clusterNum, sectorNum, dataToWrite)"
thanks.
|
|
|
|
|
hi everyone...
I m looking for an example code for making my exe run while startup...
Any help will be appreciated...
|
|
|
|
|
there are two options:
1.Place a shortcut in the startup item of the programs menu
2.Place a registry key in the HKey -> currentuser -> software -> windows -> current version -> run
you can find out how to do these through google1
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
hi everyone,
i have a datagridview with 10 column at design time. At run time i add one more column(column11) to this datagridview. Now i m unable to set the position of this column(column11). i want to show column 11 as a first column of datagridview. how can i accomplish this task in vb.net
any help will be greately appreciated.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
You can try this :
'Assume dgv is your DataGridView, col is your DataGridViewColumn<br />
dgv.Columns.Insert(0, col) ' 0 is the position of first column
|
|
|
|
|
Thanks a lot.
its work.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
i was debuging a line of code related to exit code.
Dim ee As Integer = System.Diagnostics.Process.Start("C:\Documents and Settings\pankaj_2\My Documents\My Completed Downloads\popup_src").ExitCode
here popup_src is the folder name
after the execution of the code , it opened the folder , but with an error message... Object reference not set to an instance of the object
|
|
|
|
|
I suspect that Process.Start returned null. That's the only place in this line that could cause that error.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
System.Diagnostics.Process.Start("C:\Documents and Settings\pankaj_2\My Documents\My Completed Downloads\popup_src")
line is executing without any error , even opening the folder.
and no object null reference error message !!!!!!!!!!!
then how should i overcome the problem that arises the null reference message in the following line
dim ee as integer=System.Diagnostics.Process.Start("C:\Documents and Settings\pankaj_2\My Documents\My Completed Downloads\popup_src").exitcode
|
|
|
|
|
The intelligent thing to do is always to check if a function returns null before trying to access the object. and, as Dave correctly pointed out, you won't get an exit code before the process ends.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
From the documentation of the Start method:
"Return Value:
A new Process component that is associated with the process resource, or a null reference (Nothing in Visual Basic), if no process resource is started (for example, if an existing process is reused)."
You can't expect the Start method to always return a reference to a Process object. You have to check if the reference is null or not, before you try to use it.
---
single minded; short sighted; long gone;
|
|
|
|
|
Or, in addition to what everyone else said, you're getting the exitcode before the process actually starts. You cannot get the exit code on the same line as the process you launched. You have to wait for the process to complete before you can get the code. Since the Process Start method is NOT a blocking call, you're not waiting for the process to complete to even give you a exit code.
|
|
|
|
|
As has been said, you won't get the exitcode at that point.
Try,
<br />
Dim myproc as new Process()<br />
myproc.StartInfo.FileName = "whatever.exe"<br />
<br />
myproc.Start()<br />
myproc.WaitForExit()<br />
Dim exitcode as Integer = proc.ExitCode<br />
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
Hi friends,
Please help me. I am creating a time scheduler in VB. It produces alarm messages at predefined time. It works. But i want to run that application on the starting of windows (log on). Please give me instructions and samples for this problem.
Thanks in advance.:->
|
|
|
|
|