|
-----------------------------------------------------------------------------
Hi ALL...
Using SMO I want to do backup and restore database thru my VB.Net application (2005).
The backup operation is working fine.
The restore is also working if i'm restoring to the same database in the same machine.
But, if i'm restoring as a different database name or in a different machine(where the MSSQL data files' folder path is different from the server from where i took backup), it is giving an error.
The problem i found is that i'm not able to change the path of the data files (eg; C:\Program Files\Microsoft SQL Server\MSSQL\Data)
Pls help
Have a nice day
-----------------------------------------------------------------------------
"I firmly believe that
any man's finest hour,
the greatest fulfillment of all that holds dear,
is that moment,
when he has worked his heart out in a good cause
and lies exhausted in the field of battle - victorious..."
-- modified at 7:24 Friday 30th June, 2006
|
|
|
|
|
Dear Friends,
I want to write a program in VB.Net using CheckedListBox.
Also I would like not to allow the double_click event. Because when an item is selected, the selected item should be saved in a file, now the problem arised is that, if i make a first doubleclick event the item is selected, but the selected event is running. If I call the procedure which are in the Item_selected event, then there is an error, because the system doesn't know the selected item's index.
So I prefer to cancel the event happend by the doubleclick. Please let me know how can I achieve this.
Thanks in advanced,
Suganthan
|
|
|
|
|
One old-time solution: set a "tamper-proof" switch within your program (you'll probably need to create one for every checkbox you've programmed in, so a "1 or 0" table might be best suited to the purpose) that is set "Off" when the program is initialized but is turned "On" when the Checked Item is first selected. Program the Selection verification process to not allow deselection if the "tamper proof" switch is on. That way, the only time the box can be checked or unchecked is (1) either the next time the program is initialized, or (2) unless the you programatically allow the "tamper proof" switch to be turned off while the program is executing.
A bit clumsy perhaps but it'll serve your purpose if you need a quick solution .
|
|
|
|
|
Hello friends,
i am usinfg a structure and that structure is going to save on a file..
code snipet-->
Open file_Name For Random As #1 Len = Len(myStructure)
Put #1, 1, myStucture
Close #1
---
If structure contains more values, the Put command throws an error.
I dont know why? but i think if structure size is bigger then only it happens.
Plz tell me the allowable size in bytes that can be aaded into the file.
thanks in advance!!
hoping best from U
Rahul here
|
|
|
|
|
I seriously doubt your structure is that big. The limit is controlled by the Filesystem of the device you're writing too.
Without seeing your structure, it's impossible to tell you whats wrong. The code you've posted appears to be fine.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i read msdn about sockets. I want to block access to and from all URLs.ie Block internet explorer,or any Internet application from accessing the web and vis-versa. I wrote an app but it fails and i dont know wheather ive got all right. Is there anyone who knows how to stop trafic to and fro? then allow trafic to flow when desired?
|
|
|
|
|
|
Didn't I just get done telling you what your solution is?
Now, you changed the requirements a bit. Now you want ALL applications to be denied access to the 'Net. Your best solution is now a firewall between either your network and your ISP, or installed on your machine. Either way, you'll need some kind of management app to control the firewall, like turning it on and off, opening/closing ports, ...
If you're new to socket apps, writing your own firewall will be next to impossible. You'll need an in depth knowledge of writing NDIS drivers, like Colin said, which you really can't do in VB.nET or C#. You'll need to be familiar with the TCP/IP stack and how Microsoft implements it.
I know how to mix a wheelbarrow of concrete, but it doesn't really help me in building a dam, now does it?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
if we use vs 2005 masked text box, there's no way to privent input spaces.(using array key can put blank)
can we privent this.
anyone's help
|
|
|
|
|
hi
i want to know how to validate a primary or unique key in database when the user is filling on the application layer , for example in a datagrid the user shouldn't be able to enter two same values.
i have seen an article in msdn. but i didn't bookmark it and now i can't find that article.
thanks in advance
-- modified at 20:11 Thursday 29th June, 2006
|
|
|
|
|
Really, the user shouldn't be entering Primary Key values. They should either be autogenerated and/or built from fields in the data, otherwise known as a compound Key. Part of this reason isn't necessarily because of the possibility of duplicate keys, but getting the keys entered consistantly.
The only way to verify that the new Key doesn't exist is to look it up in the database and see if it returns anything. Performance can become an issue if your table contains a large number of rows and/or you don't have your index built correctly.
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 22:43 Thursday 29th June, 2006
|
|
|
|
|
thanks.
two month ago i was working on a project for a small bussiness, i validate a "IDNO" field by using table search for new number. that table had only 140 records. but the most important issue is the performance in such a large tables with 10000 or above records.
thanks.
-- modified at 15:18 Friday 30th June, 2006
|
|
|
|
|
Hi again to Alex@UEA and other nice helpers:
I am making a prototype for my dissertation. The prototype is expected to have a view ( form) similar to the MS Access "Relationship" view.
Question in details:
1. Brief background/requirements. In my form/view, there may be one to many floating stuffs (e.g. controls/forms/thumbnails), which can be linked through drag-and-drop. A link between these stuffs is presented using a "line" (chart). User can arrange floating stuffs into a fancy layout. When move a floating stuff, the linking line is able to move, yet snap the two related stuffs automatically.
2. My solution. Floating stuffs are to be implemented with floating forms or withevent controls which are allowed to drop/move. The linking line is drawn using System.Drawing functions.
3. Question point: How to make the linking line automatically snap to floating stuffs? More advanced if possible, the line can go round other stuffs on the way when it's moving?
Can any genius advise me with a shortcut to implement this described above?
Or indicate a code sample reference? Thanks a lot.
abc
|
|
|
|
|
|
While I have to spend much time in figuring out the codes, it really is a good reference. Thanks anyway.
abc
|
|
|
|
|
Is there a way to get Visual Basic to read a file and tell you how many lines with text are in the file?
|
|
|
|
|
Sure. All you have to do is open the file and call ReadLine until it fails. With each read, increment a counter.
BTW: This question reeks of homework...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
hellow to all
i am looking for a way tp patch my program for updates on other computers , is there any way to creat it ?
thxxx
|
|
|
|
|
That depends on what you mean by "patch". The tools that come with Visual Studio offer very limited "patch" support. Basically, it only supports upgrading the entire installation of a previously installed package. Anything else and you'll have to either manually make changes to the .MSI package using something like Microsoft's Orca, or use Wise for Windows Installer, Install Shield, Advanced Installer, or some other professional MSI authoring package.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have a window service which is using a web service.
Now the window service is calling a web service function after a particular interval, so eash time a new web service object is created.
Is there a way i can use a single object but since it's a web service function the problem is if i use a single object then it will retain the previous request values which i dont want.
Can anyone help?
Thanx in advance
|
|
|
|
|
I need PGP implementation in .Net. Also from where to download PGP.
punam
|
|
|
|
|
What's wrong with typing PGP VB.NET into Google[^]?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am relatively new to the VB.NET environment (comming from C/C++/C#) and need to do some code maintenace.
I am currently trying to find the Pre and Post build steps in the compiler options but have had no luck.
Do they exist?
Thanks in Advance
Paul
|
|
|
|
|
Select menu "Project properties"
Select tab "Compile"
Press button "Build events" and a dialog appears for you to enter pre and post build events.
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|