|
Environment.SpecialFolder will give you the path to the My Documents folder.
This is a C# example, but remove the semicolons and it should work in VB.NET.
// create a writer and open the file
TextWriter tw = new StreamWriter("date.txt");
// write a line of text to the file
tw.WriteLine(DateTime.Now);
// close the stream
tw.Close();
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have several dataset tables that I want to export directly into my sql server as tables (or as inserts to tables).
Assumptions:
I have the dataset tables populated (I do)
I have a valid (open) connection to SQL Server (I do)
In order to transfer/export/update the sql db tables do I need to bind this dataset to a vb.data grid control, or dataadapter, etc?
Or is there an easy (relative) command that I can utilize within the System.Data.SQL Client (or other namespace) that I can use to get these tables to populate in my SQL Environment?
Thanks,
mtognetti.
|
|
|
|
|
this is the error i got while debugging any asp.net application on VB.NET
**************************************************************
Error while trying to run project: Unable to start debugging on the web server. Server side error occured on sending debug HTTP request
Make sure the server is operating corerclty. Verify that there are no syntax errors in Web.config by doing a Debug, Start without Debugging.
***********************************************************
when i try for Debug/Start without debugging... the build is succedeed.. but on the web page it shows the following error
************************************************************
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the system event log of the web server. Please review this log entry to discover what caused this error to occur.
*************************************************************
when i went on the Application Log of the Event Viewer.. i saw 2 errors...
Error 1: aspnet_wp could not be started. HRESULT for failure 80004005
Error 2: aspnet_wp could not be launched because the username and/or password supplied in the processModel section of the config file are invalid
i tried the machine.config file and changed the username and password acc to my sys.. but even that is not working..
AND..
also when i open the Microsoft Visual Stdio.NET..n see the Debug--->Process.. i dont find the aspnet_wp.exe there.. is there any prob in the .NET Framework >??
i think that is the prob.. but cant sort it out..
hope someone can help me
badly need the help...
|
|
|
|
|
well an old problem and I dont remember what I did to solve this. well at the moment restart your IIS and the problem will be solved temporarily. and repeat this process if the problem comes again. Mean while I shall try to remember the solution for this
or wait for any one else who has recently solved the issue...
cheers....
|
|
|
|
|
it got corrected.. first i checked all the functionalities of IIS, if they all are working properly... after that..reinstalled .NET Framework 1.1.. and then reinstalled Visual Studio .Net.. now everything is fine...
neways..thanks..
|
|
|
|
|
I want to save a the videos for my program in one binary file and play them from there when i need to. can i dont this?
|
|
|
|
|
yes you can. put the video in a binary file..say you put it in XML and then when you need to play you need to convert this file into the orignal format . And after playing, delete it from temporary files..
cheers.....
|
|
|
|
|
does anyone know how to create a database application without using sql or access???? All i need is one table with 7 columns and will probably only need to save 1000 records at the most.
|
|
|
|
|
|
Do you realy need a DB?
You might want to consider just storing the data in an XML file.
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
I dont know really anything about XML, how do i store data using an XML file or do you know of any good resources on the topic for begginers???
|
|
|
|
|
Here is one qiock example form right here on code project:
http://www.codeproject.com/vb/net/OrderAutomation.asp#xx1085137xx[^]
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
Use a .CSV file. Its easy to read and write to, it will give you your one table with several columns, you can use excel, or notepad to edit it if necessary and no other program it required to be installed in order to run your program.
|
|
|
|
|
this sounds great, do you know of any resources, tutorials, on how to create a .CSV file and integrate it into my App???
Sorry, I am a newbie
|
|
|
|
|
also is there any way to convert my sql database to a .csv file??
My program is already written for SQL server but i dont need SQL, all i have is one table. I am just going to rewrite the app using this csv file even tho i know nothing about it, is this a mistake?
|
|
|
|
|
I wouldn't trust VistaDB. They ran an ad in the lounge, and when people called them on it, they offered us a free version, which never came. That makes me think they are good at talk, and not good at action. I'd not trust them for any sort of support.
VistaDB is also for apps where Access is not enough. If you don't want to use Access ( and it seems a good fit to me ), then an XML document seems the best alternative, as it's easy to modify in memory and save out again.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I think i am just going to use this MSDE redistpackage since my app is already setup to run on SQL. I think i will just leave VistaDB alone.
|
|
|
|
|
hi everyone,
m stuck with this prob. the prob is that the windows of my application is vertically divided into two halves. In left half, I have controls like buttons, textboxes etc. The application runs fine at 96 dpi. But once I change the resolution to 121 dpi, the controls enlarge and become inaccessible. Any clues???
smith
|
|
|
|
|
First of all developemnt of windows based application should be done in the resolution same as clients screen. But you can try out working with various combinations of anchor and dock property of control, but it is for placment and not for size. also there must be some api's available to track that but for that you have to step out of the managed environment.
Het Waghela
Be Humble in Victory and Strong in Defeat.
Het Waghela, Blog|Het Waghela DotNet Questions Link|More Links
|
|
|
|
|
Anchor and dock properties did help...my application is such that it needs to be opened in different resoultions...still there are forms whose controls enlarge so much that some of them become inaccessible...also, no scroll bar comes by itself after that
|
|
|
|
|
I have drawn lines as per in paint. Now i want to erase that as like in Microsoft paint, means on any button. I would want to do like wherever cursor moves, it clear the line which have drawn on picturebox.
For drawing i am using following
Code:
Private Sub picboard_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles picboard.Paint
Try ' error trapping
If undo = True Then
For i As Integer = 0 To 13
path(i) = New GraphicsPath
path(i).Reset()
Next i
'Dim g As Graphics = picboard.CreateGraphics()
'g.Clear(Color.White)
'e.Graphics.Clear(System.Drawing.Color.White)
'g.Dispose()
ElseIf SetEraser = True Then
myAlpha = 100
picboard.Cursor = New System.Windows.Forms.Cursor("C:\icons\8.ico")
'picboard.Cursor = New System.Windows.Forms.Cursor(Application.StartupPath & "\8.ico")
'Dim CurrentPen = New Pen(Color.FromArgb(myAlpha, System.Drawing.Color.White), 5) 'Set up the pen
'e.Graphics.DrawPath(pen1, mousePath) 'draw the path!
For index As Integer = 0 To 13
'Dim CurrentPen = New Pen(Color.FromArgb(myAlpha, myUserColor(index)), myPenWidth(index)) 'Set up the pen
Dim CurrentPen = New Pen(Color.FromArgb(myAlpha, myUserColor(index)), myPenWidth(index)) 'Set up the pen
'Dim CurrentPen = New Pen(Color.White) 'Set up the pen
e.Graphics.DrawPath(CurrentPen, path(index)) 'draw the path!
'e.Graphics.DrawPath(currentpen, mousePath)
'If (picboard.Image Is Nothing) Then picboard.Image = New Bitmap(picboard.Width, picboard.Height)
'Dim g As Graphics = Graphics.FromImage(picboard.Image)
'g.DrawPath(CurrentPen, path(index))
Next index
Else
picboard.Cursor = New System.Windows.Forms.Cursor("C:\icons\pen.ico")
'myAlpha = 100 ' This will give the color a Alpha effect, you can set this to 255 if you want a full color
'*********************** NOTE ***********************************************
'The line below set the pen up with the ability to add user selected Alpha, Color and Penwidth
' A simpler, but less flexible solution would be to replace the line with the following code:
'Dim CurrentPen = New Pen(System.Drawing.Color.Black, myPenWidth)
'************ End Note ***************************
' Paint all the GraphicsPath one color at a time
'''whitescreen = False
'''blackscreen = False
For index As Integer = 0 To 13
Dim CurrentPen = New Pen(Color.FromArgb(myAlpha, myUserColor(index)), myPenWidth(index)) 'Set up the pen
'Dim CurrentPen = New Pen(Color.FromArgb(myAlpha, myUserColor(index))) 'Set up the pen
e.Graphics.DrawPath(CurrentPen, path(index)) 'draw the path!
'If (picboard.Image Is Nothing) Then picboard.Image = New Bitmap(picboard.Width, picboard.Height)
'Dim g As Graphics = Graphics.FromImage(picboard.Image)
'g.DrawPath(CurrentPen, path(index))
Next index
End If
Catch
'MsgBox("Not happening!")
End Try
' End If
End Sub
Thanks!!!
|
|
|
|
|
Hello
I need multi-Column combo box user control (derived from combo box class)
I have downloaded some cource codes from artilces available on the group but i am not able to use them perfect. Plz guide me in this regard . if some one using this then plz give me that perfect control
|
|
|
|
|
I have the multi-column Combo box downloaded from any site which I dont remember.. So if you need the source send me the email with subject Multicolumn Combo required... at rbashir@gmail.com
cheers....
|
|
|
|
|
hi all, i only want to get my scrollbars working. what i have done is paste 1 horizontal and 1 vertical bar on my form, put a button in the form but its out of view of the user(outside the form) and when i run the program i want it to be able to scroll to the place where i have placed my button. however it doesnt work, cause the button nv shows up. do i need to do any coding for this? thanks!!
|
|
|
|
|