|
You could, but it's much easier just to setup SQL Server to do it for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
SQL server backups and restores are standard SQL commands, send them as you would any other command.
|
|
|
|
|
Hi,
Let me know from which way you want to take backup?
If you want to do it through GUI you can easily do by right click on database.
If you want to do it by SQL Command then try it
Sql Command:
Backup Database databasename with init.
try it then inform me.
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
I will be doing it from within a VB .NET application. So it would probably be the sql command. I'll give it a try when I get to that part of the implementation.
thanks for the reply.
|
|
|
|
|
Hi
I am customizing the Crystal Report Viewer to set it to the color standards we have. I did all the changes but stuck with the Border color change of the Viewer. I tried drawing a line in the Paint event of the viewer but didn't help.
Does anyone know how can i change the Border Grey colour of the Crystal Report Viewer ?
Thanks
|
|
|
|
|
I want to put my referenced assemblies in a subfolder of \bin .. like \bin\assemblies. My application is in \bin.
By fefault .NET puts my app/assembly in same folder as my referenced assemblies. i use "Local Copy" of all references.
Is there a way to tell .NEt to use other locations?
//Maw
|
|
|
|
|
I'm using stored procedure to update my data through data adapter. I've initialized only the insert and update command of the data adapter to the name of the stored procedures and both the stored procedures are having the select statement for inserted/updated data.
The problem is that I'm not able to get the refereshed data back in my dataset ??
|
|
|
|
|
I am trying to get enbedded reports to open on a machine that does have crystal installed on it. I follow all the instructions given by vb and crystal, but still i get a error
The error on the machine:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.TypeInitializationException: The type initializer for "CrystalDecisions.CrystalReports.Engine.ReportDocument" threw an exception. ---> System.Runtime.InteropServices.COMException (0x80040154): COM object with CLSID {CF76A644-314B-404D-8D45-F08B51FF990B} is either not valid or not registered.
Help Please !?!
|
|
|
|
|
hi guys!
i have developed a vb.net application which works on LAN and have a single database server.
in my app a retrive date and time of the client machine on which application is installed which is creating problems as some time date time format error occurs, system date modification problem also occurs.
i want that in my application i should retrive the date and time of the server. is it possible.
can any one tell me the way retriving server date and time
bi
abhinav
|
|
|
|
|
Since you're talking to an SQL Server, you can get the current date/time from a stored procedure. SQL Server uses GETDATE() to return the local date and time of the box the server is running on.
SELECT GETDATE()
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If there is no SQL Server installed how can you retrieve the date/time from the network server itself?
|
|
|
|
|
If yur server is running the TCP/IP DateTime Service, you could write your own Telnet client and connect to it on Port 13. The service will return the server's date and time as a text. You'll then have to parse it up to get the information you want.
Another option would be to write your own Windows Service to return the server's date/time using either TCP/IP sockets (like the DateTime service does) to communicate or .NET Remoting.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
hi all,
i need to open a notepad using through opendialogbox.i have used openfiledialog i can view the files and can select it but when i open it the file is not getting opened.pls help me in solving this.
advance thanks
priya
|
|
|
|
|
hi priya, you want to open notepad means notepad exe or a notpad file(i.c .txt) in a ritch text box using vb.net... if you explin this to mw i can try
regards
sumedha
|
|
|
|
|
hi sumedha,
i want to open an existing txt and should be able to edit and save the same file at a stretch.for this should i use savedialog or openfiledialog suggestions pls.
thank u for ur great effort sumedha
regards
priya
|
|
|
|
|
The OpenFileDialog doesn't actually launch anything. All it does is let the use pick a file which is returned to your application as a String,
C:\Documents and Settings\username\myFile.txt
It's up to your code to do whatever you need to with this String. In your case, you have to launch Notepad, so you use the Process class to do this:
openFileDialog1.Multiselect = False
If openFileDialog1.ShowDialog() = DialogResult.OK Then
Dim myFilePath As String = openFileDialog1.FileName
Process.Start("Notepad.exe", myFilePath)
End If
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi priya ,
i have one code for you ..... just go through it .. this is very simple code created especially for you ....take one open file dialog box, one button on form and one ritchtext box on the same form.... now here is the code...
on button click....
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
OpenFileDialog1.Filter = "Text files (*.txt)|*.txt"
OpenFileDialog1.ShowDialog()
End Sub
and on file ok event of openfiledialog box
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
RichTextBox1.LoadFil(OpenFileDialog1.FileName,RichTextBoxStreamType.PlainText)
End Sub
thats it its will opwn the file on the ritcch text box...
using this RTB you can edit the file
and using save dialog box u can save it
i hope this will help you.....
bye
regards
sumedha
|
|
|
|
|
I'm using THE api(SendMessage or PostMessage) to send a custom message between 2 VB.Net exe's. The called exe is subclassed to listen to the custom message. In the calling exe, I'm trying to pass a string in the 4th parameter. At this stage the 2nd exe is already running. The api call keeps crashing the 2nd exe. Can it be done across exe's or only within the same exe, thanks.
thanks for your apply or provide sample code( the best :laugh )
you are welcome to visit my blog
|
|
|
|
|
I can do it now
I can use FindWindow,GetWindow and SendMessage to send message to a notepad app,just like this:
hWnd1 = FindWindow(null, "Untitled - Notepad");
hWnd2 = GetWindow(hWnd1, GW_CHILD);
sText =this.textBox1.Text;
SendMessage (hWnd2, WM_SETTEXT,sText.Length, sText);
but I don't know how to excute a word app's dictate by another app,help me please ,thank you!
you are welcome to visit my blog
|
|
|
|
|
You've managed to ask a completely different question from your original post.
This technique won't work on Word the way you want. It'll set the titlebar text of the document window, not the text of the document.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a dynamically created RichTextBox that is created in the forms "OnLoad" event. For some reason it will not set the focus of the cursor inside the Text area. Once the program is running and I use the same code again it creates a new one and automatically sets the cursor inside it. What is wrong?
Dim rtbTextArea As New RichTextBox<br />
Dim newTab As New TabPage<br />
Dim newTime As Date = Now.ToString 'Set newtime to system time and date<br />
Dim strNewTime As String = newTime 'convert newTime to string<br />
<br />
TabControl1.TabPages.Add(newTab) 'Add new Tab Page to tab control<br />
TabControl1.SelectedTab = newTab<br />
With newTab<br />
.Text = strNewTime 'Set Tab Page text to System date and Time<br />
.Controls.Add(rtbTextArea) 'Add the rich text Box to the new tab control<br />
With rtbTextArea<br />
.Dock = DockStyle.Fill 'Set Rich Text box area to fill tab page<br />
.ContextMenuStrip = ContextMenuStrip1<br />
.AcceptsTab = True<br />
.Focus()<br />
End With<br />
AddHandler rtbTextArea.SelectionChanged, AddressOf SelFontChk 'Assign SelctionChange Event Handler<br />
End With
Thanks in advance
Thanks,
Taen Karth
|
|
|
|
|
You can't SetFocus to a control until the form is displayed (i.e. active). If you want the control to have the focus when the form is initially displayed, set the control's TabIndex property to 0 (zero).
...Steve
|
|
|
|
|
it's easy to save the object in the registry as string...
but how to convert that string (after getting it from the REG) to an object telling the converter: "this is the context of this object type".
i tried using the typeDescriptor, but no help.
who can help! i need and excutable example (VB.NET code) using the Color Object!!
militiaware
|
|
|
|
|
I would suggest that you save the color in the ARGB for which is a 32 bit value. You can obtain this from the Color object by the Color.ToArgb method. You can then save this integer in the registry, read it back later and convert it back to a color object using the Color.FromArgb method.
|
|
|
|