Showing posts with label directory. Show all posts
Showing posts with label directory. Show all posts

Wednesday, March 7, 2012

Help with pointing to an image!

I am new to SQL and I am trying to have a column in my table that points to images I have stored in a directory on my system. I cannot seem to get it to work correctly and I am wondering if someone might be able to help. I want to use this image for each record with the other information on my windows form but I cannot seem to get the file pointer right. Any help would be appreciated. Thanks.

If the images are ordinary files stored on disk, the value in the column would be the path to the file. (from the servers point of view)

Is that the case with you?

/Kenneth

|||Yes. They are .jpg files stored in a directory on my hard drive. I tried putting c:\Images\xxxx.jpg. When I try to use data from that column in a windows form application it doesn't return the image.|||

Well, this isn't quite my area of expertise, but in your app, you must handle the jpg appropriately in order for it to show up. There is probably some methods or classes available for handling images (ie binary data) in the language your app is written in.

/Kenneth

Monday, February 27, 2012

Help with moving DB from 2000 to 2005 folders

Hi.
After installing SQLExpress on my DB Server, I have
the following file directory:
80
90
MSSQL
MSSQL.1
I am noticing that the DB that I am working with is in
MSSQL > DATA > MY_DB.MDF
On the Web Server, I want to connect to (server name)/SQLEXPRESS so I
am guessing I need to move MY_DB.MDF from folder MSSQL > DATA to
folder MSSQL.1 > MSSQL > DATA.
How do I do this? Is this as simple as moving the MDF and LDF files
from the 2000 folder to the 2005 folder? Or, is it more involved?
Also, should I be keeping the 80 and MSQL folders
on my hard drive?
Thanks in advance!When you connect to SQLExpress from your Web Server, you ask the rdbms to
give you some resultset. Why should you move your databases? I suppose you
migrate them or at least detach them from old instance and attach them to
SQLExpress.
The folders hierarchy you see is just the default location for SQL files
(You can find there, for example, the system databases SQL installed during
setup). You can locate your Databases everywhere you like.
Gilberto Zampatti
"pbd22" wrote:
> Hi.
> After installing SQLExpress on my DB Server, I have
> the following file directory:
> 80
> 90
> MSSQL
> MSSQL.1
> I am noticing that the DB that I am working with is in
> MSSQL > DATA > MY_DB.MDF
> On the Web Server, I want to connect to (server name)/SQLEXPRESS so I
> am guessing I need to move MY_DB.MDF from folder MSSQL > DATA to
> folder MSSQL.1 > MSSQL > DATA.
> How do I do this? Is this as simple as moving the MDF and LDF files
> from the 2000 folder to the 2005 folder? Or, is it more involved?
> Also, should I be keeping the 80 and MSQL folders
> on my hard drive?
> Thanks in advance!
>|||Ok, thanks. I am learning as I go.
I have a follow-up question. Its related, but different so
I will repost. Thanks for your help!
Gilberto Zampatti wote:
> When you connect to SQLExpress from your Web Server, you ask the rdbms to
> give you some resultset. Why should you move your databases? I suppose you
> migrate them or at least detach them from old instance and attach them to
> SQLExpress.
> The folders hierarchy you see is just the default location for SQL files
> (You can find there, for example, the system databases SQL installed during
> setup). You can locate your Databases everywhere you like.
> Gilberto Zampatti
> "pbd22" wrote:
> > Hi.
> >
> > After installing SQLExpress on my DB Server, I have
> > the following file directory:
> >
> > 80
> > 90
> > MSSQL
> > MSSQL.1
> >
> > I am noticing that the DB that I am working with is in
> >
> > MSSQL > DATA > MY_DB.MDF
> >
> > On the Web Server, I want to connect to (server name)/SQLEXPRESS so I
> > am guessing I need to move MY_DB.MDF from folder MSSQL > DATA to
> > folder MSSQL.1 > MSSQL > DATA.
> >
> > How do I do this? Is this as simple as moving the MDF and LDF files
> > from the 2000 folder to the 2005 folder? Or, is it more involved?
> > Also, should I be keeping the 80 and MSQL folders
> > on my hard drive?
> >
> > Thanks in advance!
> >
> >