Database - Creating And Managing *.db Files
May 26, 2012
I have seen a few .NET apps use .db files. I am not new to Visual Basic, however I have never created a VB app that uses databases. I do know PHP pretty well, and working with databases in PHP I am familiar with.
[Code]...
View 1 Replies
ADVERTISEMENT
Jan 20, 2011
I'm making a LAN instant messenger and I'm trying to achieve something similar to how MSN will open a new chatting window when you double click on a friend. My main form has a list of friends, and I want to create a new chat window when they double click on one of those friends. I've created a "template" chat form which I want to generate dynamically, and I've run into some problems I need help with.[code]The form will only appear once as far as I can tell, and the chat form has events such as button clicks; an error occurs when I try to change something like the text property of a label for example (eg. clicking a button on the chat form changes the text of a label on the chat form will cause an error to occur). The error I actually get is:[code]Now, call me a newb if you will, but I really don't know much about threading and all that hocus pocus.
View 4 Replies
Jan 20, 2011
I'm making a LAN instant messenger and I'm trying to achieve something similar to how MSN will open a new chatting window when you double click on a friend. My main form has a list of friends, and I want to create a new chat window when they double click on one of those friends. I've created a "template" chat form which I want to generate dynamically, and I've run into some problems I need help with. Lets look at the code I already have.
[Code]...
Now, call me a newb if you will, but I really don't know much about threading and all that hocus pocus. Some guidance in the right direction would be great.
EDIT: ClientWind is the chat form.EDIT: That's weird. It doesn't occur with the actual builds.
View 2 Replies
Sep 7, 2009
In VB.net, how can you programmatically launch a .exe file? Is there a way to check if the file is there?
I know there is some way to check using System.IO, but I have no idea. However, I have not even the slightest clue as to how to launch that .exe if it is there,
View 4 Replies
Feb 9, 2010
An application I am developing creates a directory and text file within the directory. A button is then coded to add a text string to text file. An error is issued stating the file cannot be written to as the is open to another process. This suggests the file needs to be closed before it can be written to.
View 2 Replies
Mar 17, 2009
what would be the best way to manage a connection to a database in asp.net.My application is built using an N-Tier architecture.The DAL consists of static classes with methods such as
Public Shared Sub Delete( _
ByVal connection As MyConnectionClass, _
ByVal contact_id As Integer, _
ByVal contact_timestamp As Date _
[code]....
The point to note here, is that I pass the connection to the DAL from the BLL.Should I create the connections in the MasterPage, store it in an object, then pass it to my business objects as I create them (the thing I'm trying to avoid)Should I create a connection using a static class and calling a method like CreateConnection on it, from the constructor of my business objects (Something I'd like, but I don't want to have a connection per object, I'd like it to be shared for all instances of my objects, but since asp.net is multi-threaded, a static class doesn't make sense to store connections) the solution should also work well in a Windows Forms environment (So no connection storing in session, and retrieving it with a static method in a class, for the current context)?
View 1 Replies
Jun 1, 2009
I am using sql server ASPSTate database for storing session. For testing purpose, I want to set the timeout period of 1 min.
In web.config, I have mentioned sessionState mode = "sqlserver" and timeout = "1"
In Global.asax, in Session_End event, I have redirected to error page.
But Session_End is not firing and hence page is not redirected.
As per my knowledge, The Session_End event is raised only when the sessionstate mode is set to InProc in the Web.config file. If session mode is set to StateServer or SQLServer, the event is not raised.
How can I test session timeout when session mode is set to SQLServer?
Is there any Table/column in ASPState database, where I can change session timeout value ?
I used: Update ASPStateTempSessions set Timeout=1
But still, I cant see session is ending.
How can I test my Session Timeout is working fine or not ?
View 6 Replies
May 22, 2012
Ok I know this question has been asked to death but I still have not seen a good answer. I have created an application in VS2010 using VB.NET. In my application I have an error log that is an XML file located in the Public gstLocalErrorLogLocation As String = Application.StartupPath & "ErrorLog"that gets written to in the event of an error so I can trouble shoot application easier. My application also downloads files from our FTP site and puts the files in Public gstLocalDownloadLocation As String = Application.StartupPath & "download"So I have files that get read and written to as well and created and deleted all in the Application.StartupPath which is either "c:Program Files(Application Directory)(Some Directory)(Some File)" or "c:Program Files (x86)(Application Directory)(Some Directory)(Some File)" depending on 32bit or 64bit Windows 7.
After creating the setup I install it on my test machine that have both Windows 7 32bit and 64bit.Everything in the application works great till I have to write to, delete or creat a file in those directories above. I know it is an access issue and the UAC. This will get installed on numerous systems so the options I have seen to change file or folder permission on the computers manually is not an option.What has to happen is after I install the application it just works like when you install it on XP. Some post have suggested that you us a user with administrator privilages or group which is all fine and dandy but the user I have used to test the application has all of that.
So what I am asking is how do you create an application with VS2010 in VB.NET that after creating a setup package and installing on Windows 7 will just work with out "Access to the path c:Program Files(Application Directory)(Some Directory)(Some File) is denied." If I have to install this on 100 Windows 7 computers it has to be a concreate no manually doing anything just install and work like when we installed on XP.
View 5 Replies
Apr 23, 2009
Is there a way a tool or a plugin one can use in VB.NET to create pdf files.I woul like to use that for reports
View 1 Replies
Aug 23, 2011
I am trying to import a bunch of excel 2003 files all with A:H columns and they are under the same headings etc. into a table in access 2003 database. This is a module in access im making. Im using a file search to look for every file that begins with Format (which they all do ) to get at all the files in the folder path. is there a more efficient way to do this? somehow select all files in a folder? and import each to the same table in access? The DoCmd.TransferSpreadsheet seeems to take each file path individually so I'm not sure how to get each file name in the folder to import it.
I have this at the moment:
Sub Import()
Dim db As Database
Set db = CurrentDb
[Code].....
View 1 Replies
Mar 9, 2012
I have multiple file upload boxes on a form in my mvc3 application. Request.Files shows 3 files when I put a break point in the below function and look at it.. Problem is other than coding a counter and using a select case I dont see a way to handle saving each file name to the database column it belongs to... Is there away to assign the variable on the fly I guess you could say So that the foreach loop would drop the file in the correct column. Ie handoutFile1, handoutFile2 , handoutFile3, Etc. As it stands the below will overwrite the filename in handoutfile1 every time the loop is gone through. I thought about throwing a counter in the loop and just put a select case on it to assign the db column based on the counter number. Seems like a cheap work around though. [Code]
View 2 Replies
Mar 9, 2010
I want to add multiple files to a single compressed file using System.IO.Compression. And extract them back...So I found this code on MSDN which works fine, but does not support adding multiple files into 1 single compressed file. [URL]
View 1 Replies
Apr 8, 2010
Is there a way that I can create images (bitmap, tiffs, whatever) from txt,docx,pdf,or rtf files?
One idea that I found was creating a Metafile from the file. However I am get GDI+ errors with the palette. how to get around that? Do you think this is the right track?
Dim
gr As Graphics = Me.picFile.CreateGraphics() 'i am really not using a picture box, but I thought if it helps, why not?
[Code]....
View 11 Replies
Apr 6, 2009
I am attempting to add code to an existing script that will add the log messages to the log txt file in order to determine which loops are running in the script. But all I get is either a blank log file or only one line which I believe is the last loop that ran and not a concatination of the loops that ran which I know is more than one.
How do I create a log file that will continualy grow?
These log calls are placed in each of my loops (I am just showing 2 as an example.)
log ("in loop 1")
log ("in loop 2")
etc
[Code].......
View 1 Replies
Jul 15, 2010
I am a beginner in vb 10 (vb.net). I am trying to create a text file "something.txt" and write a long string to the file. My string contains formatting chars newline and carriage return, which I want to keep.
I tried:
FileToSave.Write("test" & Chr(10) & Chr(13) & "test2", RichTextBoxStreamType.RichText)
using the System.IO.StreamWriter method but the line feeds and carriage returns are lost and all the text is just streamed together with no formatting.
Where 'FileToSave' is the path and name of the file. Note: I know I can use the vbnewline instead of chr(x) but this is not the issue.
View 1 Replies
Jul 18, 2012
i am making a simple form which can create the text file from the database table , for this , i am using this code at the load event of my form so that it can create the files at the load time.
IO.File.Create("C:Customers.txt")
IO.File.Create("C:Towns.txt")
IO.File.Create("C:Products.txt")
this code is working fine , but when i try to write my data in these file then the error come which is "the process cannot access the file 'c:owns.txt' because it is used by another process" i dont know where this file is used by my computer?
View 5 Replies
Jun 27, 2011
I am trying to write a program that writes information from texts boxes to a text file on the users hard drive. I would like to create a new text file if one already exists, for example if text1.text exists, it creates a new text file called text2.text, then if text2.text exists it creates text3.text and so on. Here is what I have so far:
[Code]...
I've tried fooling around with if statements to create a new file but it doesn't seem to be working. Additionally, How can I write to a new line in a text file. For example there are 4 text boxes and each string from each text box gets its own line.
View 1 Replies
Jan 27, 2012
Ok I have a application that works great on XP, but in windows 7 it will not let me write to my login file, says access is denied since I am not running as admin. Log file is located in "C:Program FilesCompany NameProductMyLog.LOG"
View 1 Replies
Mar 9, 2009
I want to create files based on the particular value of supplied recordset using the StreamWriter at RunTime. The files will be dynamic these will be create based on particular field.Example: If I have list of employees, I don't know from which city of the country they came from. I want to create a different files for every city and write those employees in to the corresponding files at runtime.
View 1 Replies
Aug 7, 2010
I am planning on sending some of my friends and colleagues a copy of a program that I made. For this program I was going to include a .zip file of some extras for them to look at. Is there a way in VB.NET to create a .zip folder, copy things from the program's resources into the .zip folder, and then later on be able to unpack them? PS - The purpose of this is to copy items from the resources into the .zip folder so that I can send everything in one program.
View 10 Replies
Jan 22, 2010
I recently started having problems when creating new schema (xsd) files inside Visual Studio 2008. When I create a new schema file, the only file that is created is the xsd file itself. Neither the designer.vb or xsc files are created, which of course makes it unusable. The problem seems to be caused by the fact that the CustomTool property in the property grid is missing. If I change the CustomTool property to MSDataSetGenerator, then it immediately runs and creates the missing files noted above. How do I reassociate the CustomTool with Schema files?
View 2 Replies
Dec 18, 2009
what's the best free software for creatingfiles. I'm using vb.net 2008 express.
View 5 Replies
Oct 17, 2010
I'm trying to save files in a new folder that get created and then copy 2 other files that are in my resources to that folder. I get this error:
Quote:
UnauthorizedAccessException was unhandled: Access to the path 'C:UsersMike.Mike-PCDesktopJava IDE' is denied.
This is my code:
Code:
Dim desktopPath As String = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)
Dim sdlg As New SaveFileDialog
[Code].....
View 13 Replies
Sep 7, 2010
How do I create a project with one EXE file and the remaining files as DLL files? I have 24 forms in my windows application. I am using VB.NET.
View 2 Replies
Dec 14, 2009
I am using Visual Studios 2005 and I am creating an application for our IT Security.Part of the program is for documents and procedures. What I am trying to do is automatically create a menu based on the folders and files. So far I have it taking into account the base folder and one subfolder level and files within it, but I want it to automatically also take into account any subfolders and files that may be added at a later date without having to replicate the code below for each new level. My code is as follows, it is very messy as I am not a programmer.
Code:
Public Sub ISMSMenus()
Dim clsMenuName As ToolStripMenuItem = CType((My.Forms.FrmMainScreen.TSMISMS), ToolStripMenuItem)[code]....
View 1 Replies
Oct 2, 2009
what i am doing is downloading headers from a web server using a tcpclient which works great the headers describe diffrent files and there are hundreads per file, if i download the headers and write them to a text file using a streamwriter it works great, but i need the headers to be in a text file depending on the name of the file in the header, so i need them grouped together, i am now using streamwriter to write the headers to seperate textfiles depending on the filename in the header but it is reallllyyyy slow for some reason, im not sure if it is because it has to load each file then write to it? i only have to append the new header to the end of the text file i dont have to open it up and read through it.
View 8 Replies
Aug 5, 2010
i've been looking at something like this A Simple Beep - Reminiscing about ZX Spectrum audio - CodeProject But is not what i'm looking for. I want to know how to create a wav or a mp3 file using the system Beep!Simple i want to write a wav file with the specific Console.Beep(700, 220) Sound.
View 2 Replies
Oct 7, 2011
Are DLL files created by creating a Class file in VB ? If not, what are their purpose ? If I were to create a class that held the functions I needed for my program to function, would the class file compile with the assembly as a DLL ? Do I have it all wrong ?
View 4 Replies
Jan 9, 2012
I know this idea of - if message boxes are used to display error messages inside a .dll and when the .dll is installed in a different computer (possibly a server machine), errors occurring inside that .dll will be shown in the server and not to the user. Since practically there will not be a person near the server to click 'OK' to the error message every time it occurs it will stuck the programs using the .dll.
So how to write exception handling to a .dll project?
View 1 Replies
Mar 16, 2010
We are doing a project in speech recognition using vb.net we have achieved the text to speech but still there is some problem in speech to text. We have some problems in creating grammar files so, any tips or coding for creating grammar file.
View 1 Replies