Characters Not Allowed In File Creation?
Apr 15, 2010How can I check for characters not allowed for file creation programmatically? you know like the / <> and so.
View 3 RepliesHow can I check for characters not allowed for file creation programmatically? you know like the / <> and so.
View 3 RepliesI am working on a site where I use the Split function on a string. To make sure I used a separator character that I do not use anywhere in the data I selected the character'£'. This worked fine in Firefox and Safari, but in IE8 I get an 'Index out of range' error, so apparently the '£' character is not handled correctly.
View 5 RepliesI am investigating an issue with regards to a textbox rejecting user input. In this case the error message is: 'The note was found to contain a possible credit card PAN.'Now obviously this is a custom validator but I am enable to find where it tells me what characters ARE allowed? In debug I entered a note containing no numbers and when the validators are initialized, these variables have the value below:
valNoteContainsPAN.Expression = Me.PANRegEx value = (d*)45367{13,15}(?!d)
I'm assuming this is blocking numbers of certain lengths? How can I find out how to actually read and understand the above? Google is proving fruitless
When writing to an Access file with one of the fields indexed (NO dupes allowed), I am getting the following message in the Immediate Window "A first chance exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll", when I enter a dupe.
I have put in a TRY, CATCH to catch the error and display a msgbox with the error. Is this message in the IMMEDIATE WINDOW just a warning message (generated by access), or is there something wrong with my actual program? My program does not actually crash, it seems to be working great.
I have found many pages referring to having the date be part of a txt file being created, but not like the way I need. Having said that, this is what I've got.. [code] I read a page on working with txt files and learned what I could from it. It said to use the method in the beginning of my code for creating the file. It works great, but I would like to have a new file name everday, hence the date being integrated. So even if program was running, when midnight hits, a new txt file is created and new entries are written to that file. But I can't even get the date to be put in there. Everytime I try to make this work by using methods I read about in other pages, I get a syntax error, or a warning saying an end of statement is expected. I'm not sure those methods are compatible with what I've already got going.I was actually trying to store these values in a database, and I got real close I think, but I couldn't get any help to fix my problem so I'm trying to write to daily txt files instead. url....
View 6 RepliesI have a files list which contain the directory of file. I want to know file creation date of that files. I used fileInof.CreationTime. But It is not displayed creation date. How I can know about this.
[Code]...
how can i write <p> <br/> hello this is my creation </p> in xml file while i am creating it by the use of asp.net .
it is showing <P> text </P>
i wants to create an dll (classlibrary) file for displaying selected data form database by using a gridview control.for this iam creating an dll file , in that how to declare gridview1 [code]
View 1 RepliesI'm trying to make my application append to a simple log file when it executed and when it's closed. So far, so good (see code)
However, what I would like to do, is have future lines of text to be written on the next line instead of the same line. And possibly a date stamp.
I'm not quite sure how to implement this as far as syntax goes.
My.Computer.FileSystem.WriteAllText("C:log.txt", "Application was closed ", True)
I'm trying to save a files save date, modify that file and then restore the file back to it's original date. I can't get it to work, I've tried it several ways and cannot get it to work.
My code so far is
origdate = My.Computer.FileSystem.GetFileInfo("inspection").L astWriteTime.ToShortDateString()
' changing file content here
System.IO.File.SetLastAccessTime("inspection", origdate)
be able to check if an application i am writing has been run on a week by week basis. i have created a button that when pressed creates a text file with nothing in it, i can read back the date it was created which also gives me the time which i dont need, i then need to compare the date the file was created to see if it is older than 6 days if so delete the file. how can i check to see if a creation date is older than six days???
View 9 RepliesI create a vs 2005 project and a sdf file using ms sql server express 2005. And I try to connect it in MC65. I got this error The database file has been created by an earlier version of SQL Server Compact. Please upgrade using SqlCeEngine.Upgrade() method.
View 2 RepliesIm looking to create a thumbnail from a jpg image. the image is stored in c: empimage.jpg all im trying to do is create a thumbnail from this and save it in c: emp humbimage.jpg. Ive found a number of C# tutorials and some vb.net ones. Apparently this is a really easy thing to do.
View 1 RepliesI am writing my data to an Excel file. I have two functions, create excel file and close excel file. When I am creating the first excel file, everything works fine, but creating another one after the first has been closen, I am getting an "NullReferenceException" exception.
Dim xl As New Excel.Application
Dim wkb As Excel.Workbook
Dim wks As Excel.Worksheet
[Code]....
I have to create a windows service which Monitors a specified folder for new files and does someprocessing on it and moves it to other location. I started with using FileSystem Watcher. But my boss doesn't like FileSystemWatcher and wants me to use polling on Timer or any other mechanism other than File System Watcher.
View 8 RepliesI created a background thread that constantly scans a specified folder for any .xls files that are created or modified. These files come from a vba macro in outlook that will automatically save the attachments of the mails in the this folder. This will update the modified date/time, or at least it seems to.
For Each fi In aryFi
fidate = System.IO.File.GetLastWriteTime(path & fi.ToString)
fidate1 = System.IO.File.GetCreationTime(path & fi.ToString)
[code]....
Everytime I check to the code, the fidate and fidate1 variables are indeed the correct dates/times of the file it's currently checking. It almost never gets inside the elseif block at runtime though.
I have a ERP system which create a PDF file and write it to the disk when the invoice is beeing created. On the other side a have an .NET app, which every 10 minutes read data in that folder and automatically send an e-mail to my customer with the invoice attached.The problem is that sometimes, when .NET app try to read a file which currently is beeing created -> The file is damaged. How to avoid such a situation? Is there a way to e.g. read only file creation time, and if it's "younger" than 5 seconds order app to wait a while?
View 5 RepliesI'm trying to search for a file in VB. If it exists I'd like to read it in. If it doesn't not exist I'd like to create it. I'm working in Visual Studio 2008. I was using a Streamreader before, but when I did that I was never getting any sort of error if the file wasn't there, which isn't what I want.
View 2 RepliesUsing VB6 to create a file and then open the file just created fails when run on a Vista client with Windows 2008 Server. The same code will work when run directly on the Windows 2008 Server or when using an XP client. If a Sleep 10000 is placed after the close, the program will work. What is the problem here? The code is as follows:
Option Explicit
Private Declare Function GetTempFileName Lib "kernel32" Alias "GetTempFileNameA" _
(ByVal lpszPath As String, ByVal lpPrefixString As String, ByVal wUnique As Long, _
[code].....
I have written a web page which connects to a database and then display 3 values from a management reporting system using the database.
I am accessing a database using the following code:
<asp:SqlDataSource ID="SqlToVersion" runat="server"
ConnectionString="<%$ ConnectionStrings:WebImportOnServer %>"
SelectCommand="SELECT [VerNo], [PeriodName], [PeriodNo] FROM [atblVersion]"
[Code].....
but it is how to replace the question marks with valid code that takes the values from the bound fields that I am stuck with.
Error is coming Registry Access is not allowed.While Opening a Key.
Code:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
NewDelete("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun", "Sonia")
End Sub
[CODE]...
i'm new to vb and am making a program that opens a text file, removes characters and then saves the file. so far i have the following
[Code]...
Working on a small program that saves a file path to a text file and then when run opens the text file reads the file path which will be the only line in the file. I believe I have traced my problem due to the character that would be in the text file when hitting enter to start a new line which I assume is "vbCrLf".
[Code]...
I have a text file coming out of access that I want to ftp to a server but before it gets ftp'd I want to automatically rename the file based on the characters at position 115-119, ie the file will be renamed from 'output.txt' to 'FP002'.
View 6 RepliesEssentially I am trying to replicate the Windows 7 (In-Windows) activation key TextBox form. The Form where it will auto capitalize letters, remove or deny all non alphanumeric characters except dashes every 5 characters that will be auto-input.I assume this can be done with a fairly complicated replacement Regular Expression but I cannot seem to create one to fit the needs.
This is an Example of what I have right now, but it creates an infinite loop as it removes all characters including dashes, than adds a dash, which changes the text and removes the dash again.
[Code]...
i have been trying to remove special characters. i am not able to remove many crlf in middile of the string.
View 3 RepliesI need to create a console program that allows you to enter a string, of which is then outputted in reverse.
Sample:
Input: Diewas
Output: saweiD
Apparently I need to find out about strings and will also need to use a loop.
I have a string of text i captured within AutoCAD (0.000000, 0.000000, 0.000000) wich is saved to a text based file named position.txt.as you probably have gatherd with a file name such as position.txt the text could be composed of any random number combination eg: (5.745379, 0.846290, 150.6459046).However for it to be of any use to me I need the captured string to exist without spaces or brackets how can i achiev this in VB.net?
View 2 Repliesi tried out this code to read characters from an existing file:
Dim SR As StreamReader
Dim FS As FileStream
FS = New FileStream("D:email.txt", FileMode.Open, FileAccess.Read)
[Code].....
A file I'm writing to contains a carriage return and line feed at the end that I want to remove. I'm working on this, but not there yet.[code]...
View 1 Replies