473,786 Members | 2,771 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems copying image name locations from one database to another

196 New Member
This is a little hard to explain but i will try to make it as clear as possible.

Firstly here's the setup, 2 databases on 2 different servers (databases are identical) now within the first database is a bunch of locations to images, though instead of a full path it only includes the file name not an absolute path( e.g. image.jpg).

Now im trying to copy the names to another database this is no problem but obviously the the images don't exist on the 2nd server so the file names point to no where.

So initially what i want to accomplish is to somehow add the absolute/full url to the file name (e.g. http://www.google.com/image.jpg).

Now because of the system im modifying, it retrieves the file names then adds its own path prefix to the images which is different between both servers),

i.e. on the first server it will grab the file name (e.g. image.jpg) and add to it "http://www.website1/images/listing_img/" so when display it will look like "http://www.website1/images/listing_img/image.jpg".

Now on the second server the image location will come out as "http://www.website2/realty/images/listing_img/image.jpg".

So i thought maybe if i just copied all the images from server to other according to there corresponding directories, followed by copying the names i could get the images displayed on the second website. But upon investigating found the images directory to be overly large making this a bad choice.

Now any ideas on how to achieve this would be greatly welcome,
Nov 24 '09 #1
2 2120
dlite922
1,584 Recognized Expert Top Contributor
Well the answer is simple, either copy the images over, or keep the first website active and put the original prefix in front of the image names.

If you're switching servers, moving the images is inevitable. start a copy and leave it running overnight.



Dan
Dec 1 '09 #2
carmarri
5 New Member
You can copy the images from one server to the other one using and FTP library. If these images are stored on the db, itself it's simpler, just open 2 DB connections and copy the fields.

I hope it helped


-------------------------------------
xatcom.net, diseño web
Dec 15 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2067
by: -Steve- | last post by:
Okay I have a bunch of code below. Hope it comes across readable. The problem I'm having is that in the lines under main(): cout << a << endl; Is going into the code for IntArray(const IntArray&);. Without that function these first 5 tests work fine. Of course I need that come test6(). Also something must be wrong with the deconstructor. If I comment it out my
5
13719
by: Jim Andersen | last post by:
Hi, I made a DTS-package and it works when I execute it manually, but when it is run by the SQL Server Agent, it fails. I have use the guide to create a maintenance plan. That doesn't work so good either. It runs Optimizations, but not integrity checks or backups (probably because integrity checks failed). The following from the log file:
23
7729
by: Erik Schulp | last post by:
Hi all, I am using a background image via a stylsheet. I've used this code: background-image:url("/images/tile.gif"); (which I think is correct) The image doesn't show up however, the path, the filename etc etc, everything checks out ok.
2
3513
by: Don Tucker | last post by:
Hello, I have a Windows Application that needs to load multiple image files in response to users clicking buttons. Currently, I just have these images as .jpg files on disk, but I don't want to have to migrate the files everywhere that the executable is installed. Is there a way to add them to a Visual Studio solution/project so that they are embedded in the application somehow? If so, how do I access the images when needed? Thanks,...
5
2355
by: TB | last post by:
Hi All: This news group is proving to be great help on my path towards mastering ASP.NET thanks to all of you helpful souls out there. I am looking forward to the day when I can contribute with a few ounces of hard-won knowledge as well. Meanwhile I have this (hopefully small) problem.
12
2088
by: shafiqrao | last post by:
Hello everyone, I have a script that runs in IE great, but in firefox it has problems. I understand that there are some objects that are accessed differently in IE and Mozilla. Can anybody let me know what I need to change in the file to make a copy that would run fine on Firefox? Here is the link to the file: http://people.emich.edu/srehman2/study/polls.html click on the 'Build Bars' link displayed at the top-right corner. I am...
0
1477
by: Kevin | last post by:
Hi my name is Kevin I am currently working on a Asp 2.0 project and im having some ObjectDataSource Problems The thing is i have a Class called User and a Bussiness Logic Layer FcUser with the functions GetAllUsers, GetUserByID(int) and a InsertUser(BoUser as User), the both return a generic list of User objects, the insert method sends a User object from my UI provided by the ObjectDatasource
12
2907
by: mantrid | last post by:
Im trying to move a file but am having luck my code is below. The temp and target paths are valid as they echo correctly. but I cant get the copy() function to work, or the rename() function $target_path = $targetdir . basename($uploadedfile); $temp_path = $tempdir. basename($uploadedfile); echo "Target - ".$target_path." Temp - ".$temp_path."<br>";
3
1275
by: Advo | last post by:
Hi there. Im trying to generate a table and its content from a database, and display it 5 products across, and as many rows as it needs down. Ive kind of done this, but the products are being listed like: Name Name Name Name Name Name Name Name Name Name Image Image Image Image Image Image Image Image Image Image
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10169
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.