How To Change DB Path?
how can i change my DB path without changin the code? any1 know the way pls tell me..
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Change Ocx Path Through VB
Hello. Is it possible to change the path where ocxes are saved using VB6? I am asking in order to create a setup program using VB.
App.Path How And Where To Change?
Hi,
i get in some sample sourcecodes problems to run them because the refer to an not existing drive and path on my PC. Where i can change the app.path?
How To Change The App.path?
Hello everybody,
I want to change my app.path while running.
I want to change the path to directory called x to a new directory y.
please help
Thanks
ERAN
How To Change The Path Of A Picture In Vb
I am creating a program for products and inventory. I have the paths of the pictures saved in a database. When the user enters a new product, they must upload a picture of the product. When the user selects the picture that they want to upload, I need vb to make a copy of the image and paste it into my application folder c:project. Is there a way to code the copying and pasting of a picture from one location to another?
thanks
Change The App.path? VB6 && Access
I have used the Package & Deployment Wizard to put my Visual Basic Program on CD, I then copied over my database 'calculations.mdb' onto the cd also so that the VB program can access the database when installed on another PC. However, the program still searches the same path as it does on my computer when trying to open the database whereas i would obviously like it to search for it wherever the user installs it. Is it possible to hardset this in my VB code? This is what it is set to at the moment:
conconnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
App.Path & "" & "calculations.mdb;Mode=Read|Write"
Does anyone know how I can adapt it? If not, is it possible to set it to search on the CD in the disk drive?(although this would be awkward as the user would have to keep the cd in there but better than nothing!)
Thanks a lot!
Amy
Change App Startup Path
application.TargetPath = "c:Program Filesphotoshopphotoshop.exe " &argument
application.WorkingDirectory = "c:test"
application.Save
ex) i use photoshop
i would like to change workingdirectory path as i put special button
i made some code
but i can't complete that code
can you modify this code ?
i will wait your answer .
thank you
Change To Relative Path
I'm working on an application launcher and when I add an app. to the list I want to change the path to a relative one automatically since the apps will be on a USB Stick. I've done a search and found threads where the file was defined (such as a database) but couldn't figure out how to get them to work where the path and file would change (not hard coded). In otherwords, take F:AppsMyAppsSomeApp.exe and change the path to relative when the Add button is clicked so when the drive letter changes it will still work. Everything is being saved to an INI file.
Thanks for any help.
Here is the code I'm using to "Add" the app.
Code:
Private Sub cmdAdd_Click()
Dim strFileName As String
Dim FilePath As String
If Text3.Text = "" Then
MsgBox "Please enter the path or click on 'Browse'.", vbExclamation, "Error"
Exit Sub
End If
FilePath = Text3.Text
RTrim (FilePath)
Form1.List2.AddItem FilePath & " " & Text2.Text
Form1.List1.AddItem Text1.Text
Form1.WriteList
Label8.Caption = "The Application has been added."
End Sub
Change Registry Path
How do I store registry values in other places besides the default place? I know how to store, just no how to define the path.
How To Change Path Variable
guys.
i am writing an application that needs to add my application's path to the PATH variable..is there any way to do it in VB???
thnx
nean
How To Change File Path?
I have vb run on this folder, c:
p303program, and with 4 subfolders, "archive", "stage_in", and logs.
like this:
c:
p303program
c:
p303stage_in
c:
p303archive
c:
p303log
strSource = app.path
msgbox strSource => c:
p303program
How to change the path to c:
p303stage_in without using "chdir"?
Thanks
vb999
How To Change Path To VB Project?
I was in the process of moving my project files from my laptop to my home PC...
After I moved all the appropriate files, I attempted to open the Project.vbp...it then stated that it was unable to load because the path to the Main form was incorrect...the path that it showed included Program Files/Microsoft Visual Studio/VB98/Main.frm....it also had Concatenated another path to this which was the My Documents/ and the name of the folder that I opened the Project.vbp from...
I really need to figure this out and quick! Does anyone know how I can work around this, or what steps I need to take to open the project properly on the other computer?
I appreciate any assistance....
Thank you.
Change Abs Path To Relative
I have a absolute path name, and I want to change it to relative to another directory
eg. abs: c:abc empv33logo.bmp
if the supply directory is c:abcsampledrive;
then I want to change the path to:
.... empv33logo.bmp
Anyone has the code?
Change Database Path
hello eveybody....
here i have problem with my project, i got 2 MSAccess database. first database in c:program fileABMSclaimclaim.mdb. i can run it smoothly. but when i creat new folder and database like this c:program fileABMSfaxfax.mdb the vb error said there are no fax.mdb in folder claim.
how to make vb read my fax.mdb database from fax(new) folder.
please someone halp me.
tq
Change My Documents Path
does anyone know how to change the my documents path from code?
I can retreive the current value no worries and i have tried changing the path in the registry but it doesnt happen so i am assuming it is a permissions thing
I was just wondering if any one knows a method maybe an API call or something that will do that
thanks all
Change Path MS Access
Hello,
I have a trouble with my ms access database. With a function this database open a program (an viewer) from a specific location. The problem is that for some of the PC's from the network the path is different than before.
for example for the older pc's the path is C:Program filesviewerviewer.exe
and for the newer one is C:Program files
ew viewerviewer.exe
i have to write a function that serch in first path, if the path doesn't exists to open from the second.
Thanks
How To Change Directory Path In SaveAS UI?
Hello, Everyone,
I tried to use GetSaveAsFilename function. It works. However, It prompt to my default directly automatically which I don't want to let other to know. Would someone be kind to come up a good idea to change it to one dirrectoy path which I want the file to?
Thank you very much!
Charlie
Code:
vaFileName = Application.GetSaveAsFilename(InitialFilename:="", _
FileFilter:="Excel Filer (*.xls), *.xls", Title:="Save as...")
Commondialog Doesn't Change Path?
Code:
Filter = "MP3 Files Only (*.MP3)|*.MP3|"
Filter = Filter + "WAV Files Only (*.WAV)|*.WAV|"
CommonDialog1.FilterIndex = 1
CommonDialog1.Filter = Filter
CommonDialog1.Action = 1
Text1.Text = (CommonDialog1.FileTitle)
msgbox app.path
if i run this code, app.path is the path where the exe file lies, not the path that i opened. how can i get the path i opened?
thx
How To Change ODBC Database Path By Vb6?
Hi,
I use crystal report 6 and Access 2000 to modify one application.
My application have 2 DB, in server and client side. Wher server down, the client db will be activated.
The problem is Crystal report 6 used ODBC rather than direct link to Access 2000. So if db is conveted , i must change ODBC DB path.
Is it possible to change it by vb6 Code, or else i need set up 2 ODBC Link for every client pc.
Thanks in advance
Commondialog Will Change My Adodc Path
im doing the project which is using adodc to link with my database(ms.access)
the adodc path was changed after i add in the commondialog control into my project.
for example..
my original adocd path is "db.mdb"
i select the file with commondialog.showopen and it change my adodc.path to commondialog.filepath + db.mdb
at last...i get the error msg which cant find my database.
pls help to solve this problem
Change SHELL Working Path?
Shell "sp2tccli.exe cloctrak", vbNormalFocus
How do I tell that to set the working path to C:Program FilesAnother App
??
Thanks.
To Change The Path Of The Ocx Loaded In Projectl
Initally the ocx for a particular project was loaded from some path ex
c:dataentry.ocx . I have used this ocx in the forms
Now i want to change the path of ocx for ex i want to pick from
d:dataentry.ocx What should i do
How Do I Change The Default Install Path Of My Application?
After running the installation of a program that has been packaged and prepared for deployment, the deafult installation directory is:
c:program filesapplication name
how do I change the path so that when the setup file is executed, the DEFAULT path is something else.
Change Directory Path In SaveAS UI NOT Work?
Hello, Everyone:
I tried to change the directory path in SaveAS UI by adding ChDir "C:Program FilesTS103MyData". It Prompts the directory. However, I put the file name and tried to save the file. It prompts the SaveAs Unit again and show the default directory. And the first step save not work. I want to get rid of the second SaveAs step and save in the first step. Would be someone be kind to help me out?
Thank you very much!
Charlie
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim vaFileName As Variant
SaveAsUI = True
ChDir "C:Program FilesTS103MyData"
vaFileName = Application.GetSaveAsFilename(InitialFileName:="", _
FileFilter:="Excel Filer (*.xls), *.xls", Title:="Save as..®")
If vaFileName = False Then
Cancel = True
Exit Sub
End If
'Code continue..®
End Sub
Howto Change The Path In A Savas Dialog
Hi
How can i change the path of a saveas dialog box with VBA
I' ve tried this but hat doesn't work
Code:
PathAttach = "C:myDirAttachments"
ChDir PathAttach
FileName = .GetSaveAsFilename(, , , "Files Save As")
If VarType(FileName) = vbBoolean Then
MsgBox "User Cancelled"
Else
MsgBox FileName 'File/Path as user saved it
End If
Change Project's Reference/component Path. Possible??
let say i add a reference to my project: Crystal ActiveX Report Viewer Library 10.0 and the location is C:Program FilesCommon FilesCrystal Decisions2.5crystalreportviewers10ActiveXControlsCRViewer.dll
my question is : how can i change the path to somewhere else let say C:Program FilesCommon FilesCrystal Decisions2.5inCRViewer.dll
Pros...please help
Change Desktop Icon Target Path?
I have code in my app that deletes an existing icon and recreates it with a new target path. This is my code, it seems like over kill to me.
Is it possible to just change the target paths file name instead of deleting it and then recreating it?
VB Code:
'delete the flash shortcut Dim shell As Object Dim link As Object Dim DesktopPath As String Set shell = CreateObject("WScript.Shell") DesktopPath = shell.SpecialFolders("AllUsersDesktop") fso.DeleteFile DesktopPath & "Agent Prospecting Presentation.lnk" 'create a new flash shortcut 'because we are replacing the old exe Set shell = CreateObject("WScript.Shell") DesktopPath = shell.SpecialFolders("AllUsersDesktop") Set link = shell.CreateShortcut(DesktopPath & "Agent Prospecting Presentation.lnk") 'link.Arguments = "1 2 3" link.Description = "Agent Prospecting Presentation" 'link.HotKey = "CTRL+ALT+SHIFT+X" link.IconLocation = "C:WestfieldInsuranceWestfield_1to1F_v1.exe,1" link.TargetPath = "C:MyWestfieldPresentationWestfield_1to1F_v1.exe" 'window style 3=maximized, 2=normal link.WindowStyle = 2 'start in link.WorkingDirectory = "C:MyWestfieldPresentation" link.Save
How To Change Package And Deployment Install Path
I need my database to install at C:documents and settingsall usersapplication dataFolderNamedatabase name
Can anyone tell me how to change te .lst file to change the install path for the database? I have tried to change the path but had no luck on getting it there.
Thanks,
Jason
Change File Path And Opening Image/excel/word Files
hi....I have decided not to store my files in the database as performance may be slower in the future when there are more files....so therefore Im gona save the path of the file instead in the database and save the path in a common network drive...can anyone tell me how do i change the path saved when the dialog box pops up and the user selects what files they want to choose to save? Now I only knw how to save the pathname as it was retrieved from the dialog.....how do I change the pathname to save in another network drive? Right now in order to change the pathname I have a save dialog which follows the first open dialog but thats not what I want as i want to save it all to a common drive..
here are codes i used to attach the file
Private Sub cmdAttachment_Click()
Dim mystring As String
Dim myst As String
On Error GoTo DialogError
With CommonDialog1
.CancelError = True
.Filter = "Text Files (*.txt)|*.txt"
.FilterIndex = 1
.DialogTitle = "Select a file to attach"
.ShowOpen
MsgBox "You have selected " & .FileName
'With CommonDialog1
.CancelError = True
.Filter = "Text Files (*.txt)|*.txt"
.FilterIndex = 1
.DialogTitle = "Select a place to store the file"
.ShowSave
mystring = Trim$(CommonDialog1.FileName)
MsgBox mystring
txtAttach.Text = mystring
m_recRMA!Attachment = mystring
m_recRMA.Update
End With
DialogError:
End Sub
And this is the code to open the file attached...
Dim sExtension As String
Dim iReturnValue As Variant
sExtension = UCase(Right$(txtAttach.Text, 3))
If Dir$(txtAttach.Text) = "" Then
MsgBox "Sorry cannot find file" & vbCrLf _
& "It may b hidden.", vbExclamation
Exit Sub
ElseIf sExtension = "TXT" Then
iReturnValue = Shell("notepad " & txtAttach.Text, 1)
End If
End Sub
If it were a image file or other files like doc/excell how do i open it? The above only works for text files...how do i attach the other file types???? helpppppppp
Get A Network Files Local Path From Its UNC Or Mapped Drive Path
After a user browses for a file, if it is a network file I want to get the path that is local to that networked computer. For example if I have a mapped drive named "N:" which maps "\ServerShared" which is "C:Shared" on the server, if a user browses for a file and selectes "N:MyFile.txt" or "\ServerSharedMyFile.txt" I want to get the path that is local to Server, which is "C:SharedMyFile.txt". I have been searching the forum with no luck but if it is out there and you could please point me in the right direction... Thanks!
Mapping Windows System Folder To Application Path(EXE Path)
Dear all,
My problem is this :
I am using an ocx's for flex grid & Image edit for displaying data & images.
I want to keep my EXE file & the supporting files in CD, so that anyone can run this application from CD.
I don't want to do installation package & also not to register the ocx files. Instead of this I'll keep my supporting files along with EXE in CD.
I want to map system folder to my app.path (in CD), so that my application will run taking supporting files in CD rather than windows system folder.
Here I'm stuck.
By doing this I can avoid regestering OCX or developing package.
Please help me to solve this problem.
Thanks
Bala
VB RunTime 76 Invalid Path Name; Path Not Found. Please Help
I am writing an application that the user inputs three things. 1. Path To List 2. Path To Save Text File 3. Name of text file. The user inputs the Path To List and presses the List Files button. Then the user inputs the Path to save the file, and 3rd the name of the file. Then they press transfer which moves the list from the FileListBox to the ListBox and then writes a text file of the list. If the user inputs a nonexisting directory they will get a RunTime 76 error invalid path name; path not found. I was wondering if there was a way to test to see if a directory path is valid. Please Help! any help is extremley appreciated.
Path Not Found Error, But Path Exists
I am getting a path not found error on the highlighted line, but the thing is, the path is found. i tried to debug and the information seems right.
VB Code:
Private Sub cmdSaveFile_Click() m_strProjectsDirectory = "Projects" m_strBackupDirectory = "Backups" m_strSaveProjectFileName = txtFileName.Text m_strSDPROJFileName = m_strSaveProjectFileName & ".sdproj" m_strFileNameLocation = App.Path & "" & m_strProjectsDirectory & "" & m_strSDPROJFileName If Len(Dir$(App.Path & "" & m_strProjectsDirectory & "", vbDirectory)) > 0 Then 'do nothing because the Projects directory exists Else MkDir (App.Path & "" & m_strProjectsDirectory & "") End If If m_strSaveProjectFileName = vbNullString Then MsgBox "You must input a filename!", vbExclamation, "Error Encountered." Exit Sub ElseIf LCase(Right$(txtFileName.Text, 7)) = ".sdproj" Then MsgBox "Input your file name, excluding the file extension.", vbInformation, "Error Encountered." Exit Sub End If If FileExists(m_strFileNameLocation) Then m_intMsgBoxAnswer = MsgBox("The file name that you have specified is already in use." & vbNewLine & _ "Would you like to overwrite this file?", vbExclamation + vbYesNo, "File Name in Use.") If m_intMsgBoxAnswer = vbNo Then MsgBox "The file has not been overwritten" & vbNewLine & _ "and has not been saved anywhere.", vbInformation, "File Not Overwritten." Exit Sub Else 'If vbYes Then If Len(Dir$(App.Path & "" & m_strBackupDirectory & "", vbDirectory)) > 0 Then 'do nothing because the backup directory exists Else MkDir (App.Path & "" & m_strBackupDirectory & "") End If 'copy the file to the backup directory, date and time stamp it so as to prevent file copy 'problems [hl]FileCopy m_strFileNameLocation, App.Path & "" & m_strBackupDirectory & "" & Date & Time & m_strSDPROJFileName[/hl] 'delete the file from the original directory Kill m_strFileNameLocation 'rewrite the file WriteProjectFile 'inform the end user MsgBox "The file has been overwritten as requested. Please note that" & vbNewLine & _ "the file was also backed up for you and placed within the" & vbNewLine & _ "backup directory." & vbNewLine & vbNewLine & _ "The location of the backup directory is:" & vbNewLine & _ App.Path & "" & m_strBackupDirectory & "" & vbNewLine & vbNewLine & _ "The name of the backed up project file is:" & vbNewLine & _ Date & Time & m_strSDPROJFileName, vbInformation, "File Overwritten." End If Else 'file name not in use WriteProjectFile End If Unload MeEnd Sub
Convert UNC Path To Local Drive And Path
I thought there was a way to do this but I can't remember it. Ho can you convert a UNC path back to a local drive and path (mapped or local). I believe there was an API but I can't find it.
ex. \serverdevelopment converts to Z:Development
Find The Path, Enter Path Into String
What I want to do is search for a file on a drive and have
the path name entered into a string... for example pth$
Code:
Print #2, "C:"
Print #2, "CD"
Print #2, "CD Program*" < Prob 1
Print #2, "CD America's*" < Prob 1
Print #2, "CD System"
Print #2, "CD Save" < Prob 2
Print #2, "CD save" < Prob 2
Print #2, "DIR /A /O:D > C:" & ID$ & "save.LOG"
Also I have the following problems with the code above.
1. There are two directory's that are named "CD America's"
The problem im having is I canot use spaces and have to use a astrix.
2. Case sensitive for going down directories.
Cheers
Nath
File Path Withouth Application Path
Hi all,
my program uses some sub directories to store data in it. The user can select files through a common dialog (file open) control.
What i need is the location of the file WITHOUT the application path/folder. So something like
app.path = c: estapplication1
filelocation = c: estapplication1files est1.txt
result (what i need) should be then = files est1.txt
Any ideas about this one?
Greetz,
per-i
How To Set The Current Drive And Path To A Network Path?
Hi everybody,
In my client's office, there is a Windows 2000 Advanced Server computer and several Windows 98 workstations connected to it. From a workstation computer I want to set the current drive and path to "\ServerServer eMarket". Is that possible without mapping the network drive?
Help With Path Of File / Shell Program Path
Currently I am using the shell command to open an application called Kodakprv.Exe. Their are going to be multiple users for my application and of course the Kodakprv.Exe is in a different directory on each PC. Is their a way to find the directory that the kodakprv.Exe is in and then use that as Path in the shell command to open Kodakprv.Exe. Any help would be greatly appreciated.
Here is the code I have now
Code:
sAppName = Trim(strImageName) & " - Imaging Preview"
intRet = Shell("C:Program FilesWindows NTAccessoriesImageVuekodakprv.exe \lightfootd-drivewebsecurescanimages" & strImageName, vbNormalNoFocus)
TEMP Path? System Folder Path?
Hi,
i need to extract a temporary file onto my clients computers, and i want this file to go to the windows temporary directory, (e.g. c:windows emp or c:winnt emp)
is there a way to find this temp directory on the clients machine and then set that into a string to use? because some operating systems have different paths to their temp directory, my script must be dynamic
Thanks
Edited by - Ahmz_055 on 12/11/2004 4:59:01 PM
How To Obtain Relative Path From Absolute Path?
Hi,
How do I obtain the relative path (e.g. "....Test.tmp" ) from the absolute path ( "C:Test.tmp" ) with respect to a directory (e.g. C:Temp2Dir2 )? This should work irrespective of where the file Test.tmp is stored.
Do you have any sample code which could help me do this?
Any help would be greatly appreciated.
Thanks and Regards,
SN
Application Path Or File Path I Am Not Sure
I have a very small exe that is written in vb6.0 It is so small it doesn't require any setup program to run it.
So here is my question. When the user moves the exe to a folder on load I want to display the location of the exe to the user if they request it and to load the proper help files if they have moved them along with the exe.
Does anyone have any sample code of how to do this. I am sure it could be done with an api call, but wouldn't know where to start.
Any help as always is greatly appreciated.
Thanks
Path Location Problem Dir.path
I have problem here.. i have textbox that store path location. It show in the textbox as C:\ . How I can show in the textbox as C: ?
Dir1.Path = Text1.Text
|