Specifying Path Where DBF File Located
Jun 28, 2010
I am trying to connect to a dbf file.. I have it so right now I can specify the path of where the dbf file is located ie, C:\Temp but there is more than one dbf file located in the folder and I don't know how to get it so I can specify which dbf file to open. I have done searching and believe I have to do it thought a SQL statement but am not sure how to go out it and once the statement is created how to use that to open the connection.
View 2 Replies
ADVERTISEMENT
Apr 1, 2012
I have default.aspx used masterpage, in master page i have a control called DefaultMenuContent, this control have a dropdownlist with autopostback, the problem is loosing the selection even if i use Is Not PostBack in control's load event, how to persist the dropdownlist selection?
In Master:
<asp:ContentPlaceHolder ID="MenuContentPlaceHolder" runat="server">
<art:DefaultArabicMenu ID="DefaultMenuContent" runat="server" />
</asp:ContentPlaceHolder>
[code]....
View 1 Replies
Apr 2, 2012
I am loading an Assembly using Assembly.LoadFrom() as the assemblies are located in a different path from Application Base directory.
Dim oAssembly As Assembly = _
Assembly.LoadFrom("C:\MyFolder\" + ddlXlate.SelectedItem.ToString() + ".dll")
And I consume a Type from that assembly without any problem:
oXML = CType(oAssembly.CreateInstance(sBaseType + ".XlateContainer"), _
XlateBase.XlateContainer)
However, the problem occurs when I try to use a Type from this assembly from within another method like the one below:
oComboBox.DataSource = _
[Enum].GetValues(Type.GetType(sType + "+ItemEnum," + sAssemblyName))
sAssemblyName is the one I loaded using LoadFrom() actually. After it said it cannot find the assembly, I used AssemblyResolve event which solved my problem :Subscribing AssemblyResolve event :
AddHandler AppDomain.CurrentDomain.AssemblyResolve, _
AddressOf MyResolveEventHandler
Event Handler Method:
Private Shared Function MyResolveEventHandler(ByVal sender As Object, _
ByVal args As ResolveEventArgs) As Assembly
Return Assembly.LoadFrom("C:\PSIOBJ\" + args.Name + ".dll")
End Function
And I thought maybe the error occurs because it cannot find a dependent assembly defined in assembly manifest file I loaded using LoadFrom() already but when I checked the args.Name, I saw it was trying to load same assembly and after that it worked without any problem. So basically a type in the loaded assembly cannot be found before the event adding change.
My old code was using AppDomain.CurrentDomain.Load() and Assembly.Load() methods and they were working fine without the AssemblyResolve event. I was able to reach types in dynamically loaded Assembly from every where within the same AppDomain.
LoadFrom() can find dependencies automatically within the same requested assembly path and that couldn't be problem as everything this dll needs was there. So at first it looked like a AppDomain problem to me as it looks like it seems it can reach assemblies from Load context instead of LoadFrom context and I am now using LoadFrom context.But now it seems I should pass oAssembly instance evertwhere to use any type from the loaded assembly?Doesn't it load the assembly where I can reach it everywhere (same AppDomain) using simple Type.GetType(...) method?
View 2 Replies
Aug 22, 2006
I have a Access program and I'm using VBA code in the background to run Winunzip using shell command. Well, the path of the .zip file has spaces in it and it's not recongizing the path as a valid path. Is there a another way to tackle this problem besides the shell?I can't us pkzip either. Has you can see I had to use progra~1 instead of Program Files.[code]
View 2 Replies
Oct 8, 2009
im having trouble opening adobe from my coding, also is my file ok or do i need to call from its folder location within the program.i need to be able to open a specific .pdf file from a whole range of file located in the program.what im getting the user to do is press 1 of about 14 buttons to select a brand. then in textbox1,enter the first part of the file name so in this case a274 (adobe runs in .pdf format so the file would be a274.pdf).at the moment i get a win32 error high lighting startinfo as the problem so im thinking its the adobe.exe is the problem. [code]
View 9 Replies
Nov 23, 2010
Is it possible that i can run a vb6 exe file located in another computer using my vb.net program? how?
View 4 Replies
Feb 9, 2011
How can I get the size of a file in MB if the file is located on a server? If the file is on a computer I would do this:[code]......
View 5 Replies
Feb 4, 2010
I am having a big problem with deleteing a file form the server. I have the filename for a image stored in my SQL database. the problem is i am getting an error of "Illegal characters in path. " Here is the code below:Everything is working fine until the delete command.
Protected Sub DeleteButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim tmpEquipID As String = Request("EquipID")
Dim tmpImageID As String = (CType(FormView1.FindControl("ImageIDLabel"), Label).Text)
Dim d As New equippicsDataContext
[code]....
View 3 Replies
Jan 29, 2011
How do I access a file located directly in my bin folder via a relative file path?
View 2 Replies
Dec 17, 2009
I'm trying to delete a dll file in the system32 folder but receive a permission error (Access to the path 'c:\windows\system32\testfile.dll' is denied.)
I'm using:
[code...]
I have multiple versions of an app that uses a dll, I have to replace the dll with the correct version and register it. The plan was to delete it from system32, and copy over the relevant version, then register it.
View 1 Replies
Nov 29, 2011
I am unable to run batch file that is located in mapped network drive using System.Diagnostics.Process in VB.Net. I get:'<batchfilename>.bat' is not recognized as an internal or external command, operable program or batch file.Press any key to continue..I get the same error when navigate to the folder (using explorer) that contains this batch file and double click it. I can successfully run the batch file by changing the directory to that folder through command prompt. I can't figure out why this is happening. I think the problem is Start() function of Process works like double click rather than just run the batch file.
[Code]...
View 1 Replies
Apr 23, 2010
How do I load or display an Excel file located on the hard drive in vb 2005?
View 2 Replies
Feb 6, 2011
Is it possible to load the content of a text file (.txt) into a listbox or combobox if the text file is located in a webpage?let's suppose that the file is located at url...how would i load the content of the text file into my listbox/combobox?
View 15 Replies
May 22, 2012
I am trying to read and display a file using MapPath as follows :
Response.ContentType = "Application/pdf"
Dim FilePath As String = MapPath("../Document/123.pdf")
Response.WriteFile(FilePath)
Response.End()
This procedure will work fine and display in the browser. However, if I save the file to C:Document123.pdf, how can I access this file using relative path in MapPath function. Is there an option to access the file which is saved out of IIS server? I am using vb.net 2003.
View 1 Replies
Jun 14, 2012
I'm using acrobat that returns unix paths instead of windows path's. So im wondering if there is a way in vb.net to convert the path to windows path.
i tried using:
docs(i) = javaScriptObj.path().ToString.Replace("/", "").Substring(1)
position = docs(i).IndexOf("")
docs(i) = docs(i).Substring(0, position) + ":" + docs(i).Substring(position + 1)
this only works on local files, but fails when im starting to use network drives.
View 1 Replies
Feb 27, 2012
Reading a .txt file in VB.net. My file path is C:UsersMyLilMulePepeDocumentsVisual Studio 2008Projectscurtain_calls.txt.
This is my line of Dim LoanOptionsFile As String = "C:UsersMyLilMulePepeDocumentsVisual Studio 2008Projectscurtain_calls.txt"
I can read the file when I run the program, but how do I write the file path so that someone else can download my program and file and read the file on their system?
View 3 Replies
Oct 1, 2011
The code below reads an Icon from an .ico file, converts the Icon read to a Bitmap and saves the bitmap using:
Bitmap.Save(PathA)
Then does:
PanelShowWrittenIconA.BackgroundImage = New Bitmap(PathA)
[code].....
View 2 Replies
May 9, 2009
I need to parse some text to extract the name/path of an image file inside an X file. The part of the file looks something like this:
TextureFilename {
"C:\\Users\\USER\\Documents\\Map\\Textures\\Grass01.dds";
}
[code].....
View 14 Replies
Feb 21, 2010
Well im making a program that will Add the Safe File Name of the File opened in the Open File Dialog to the first column of the listview and the File name and path to the second. What i want it so when i double click on the Safe file name it will open the file specified in the path in the second column.i already got the add file to it.
View 4 Replies
Jun 5, 2009
Is there a better way of finding the path of a file that was opened with the open file dialogue? This is what I did. It works, but it seems like there should be a way to get the path through one of the open dialogue options.
Code:
'm_PicSource = OpenFileDialog1.FileName
'm_PicSource is a global var
Dim strCnt As Integer = m_PicSource.Length - 1
[Code].....
View 6 Replies
May 8, 2010
I made a media player that has a list box to select the file to play but it displays the file path but I want the filename and length.The code is:
Private Sub ListBox1_SelectedIndexChanged(ByVal sender
As System.Object,
ByVal e As System.EventArgs)[code].....
View 18 Replies
Nov 10, 2009
how do i return the file path to a variable when using open file dialog to browse and open a file?
View 14 Replies
Apr 22, 2012
I am trying to create a sort of 'personal code library' in visual studio 2010 where the form displays a list box of certain project files in vb that I have made in the past and when selected, a button can be pressed that launches the .exe files of those visual basic program project files or displays the source code (.vb file)
[Code]...
View 1 Replies
Nov 17, 2009
I've got a setup where a ComboBox displays all files in a certain directory, but it shows each files path/directory, and it also shows the files format next to the file name (i.e. "filename.txt").
View 2 Replies
Sep 15, 2011
The reason I ask is that I want to print, at run-time, a file in the application's resources, like this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim printProcess As New Process
printProcess.StartInfo.FileName = "C:UsersGeoffrey van WykDocumentsCountdown_Timer_Help.rtf"
' printProcess.StartInfo.FileName = My.Resources.Countdown_Timer_Help
printProcess.StartInfo.Verb = "Print"
printProcess.Start()
End Sub
View 5 Replies
Jul 24, 2010
I'm working on a personal project and so far everything is going perfect. Almost. I have a problem with getting music file info based off of its file path. I.e. "
C:UsersUSERetc." The only things I would need from y'all would be how to get the song's Artist(s) and Name (maybe there's something similar to 'AxWindowsMediaPlayer.currentMedia.getitemInfo("Information")' without actually having to play the song?
After I get this information, I would like to know how to add it to a ListBox as this: "[Artist] - [Song Name]", but I can do the text part if I know the getting-the-information part and adding-the-info-to-listbox part.
View 1 Replies
Dec 7, 2011
can anyone please explain to me how I get the file path to an embedded video resource file I have?Currently I know how to get this while debugging, but I am unsure how to refer to it when built.It needs to work no matter where the application files are.[code]
View 3 Replies
May 1, 2011
Im trying to get a list of all the text files present (there file paths) in a certain folder (lets say C:\Users\podypodpod\Desktop\textfiles) and then add them to the list box (lb_Entrys)
ive manage to find this code to get all text files from the desktop , but i cant manage to edit it so i can give an actual filepath for it to search
CODE:
View 2 Replies
Jan 23, 2010
The reason I ask is that I want to print, at run-time, a file in the application's resources, like this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim printProcess As New Process
printProcess.StartInfo.CreateNoWindow = True
[code]....
When I use "C:UsersGeoffrey van WykDocumentsCountdown_Timer_Help.rtf" as the argument of FileName, it works. But when I use My.Resources.Countdown_Timer_Help, it says it cannot find the file.
View 2 Replies
Dec 2, 2010
i know how to do it but is this even possible in vb. get a textbox and a button.write a file path to something you want to dlete in the text box then press the button and the button deletes the object the file path has specified.and you
View 2 Replies