Image path not storing in sql database

Hello,
I have read here on the forum how to upload an image to server and store path in  your database, the image uploads correctly to the correct folder on my server but the image path does not get stored on my sql database (not local hosting). I receive the error: The file has been uploaded, and your information has been added to the directory. Column 'image' cannot be null.
My database has the following columns:
id
datum
image
sectie
My code is as follows:
<?php require_once('Connections/dbTroch.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;   
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  return $theValue;
mysql_select_db($database_dbTroch, $dbTroch);
$query_rs_aanbod = "SELECT * FROM tblSlideshow ORDER BY id ASC";
$rs_aanbod = mysql_query($query_rs_aanbod, $dbTroch) or die(mysql_error());
$row_rs_aanbod = mysql_fetch_assoc($rs_aanbod);
$totalRows_rs_aanbod = mysql_num_rows($rs_aanbod);
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
$target = "images/slides/";  //This is the directory where images will be saved// 
$target = $target . basename( $_FILES['image']['name']); //change the image and name to whatever your database fields are called//
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "add-photos-aanbod")) {
  $insertSQL = sprintf("INSERT INTO tblSlideshow (image, sectie) VALUES (%s, %s)",
                       GetSQLValueString($_POST['file'], "text"),
                       GetSQLValueString($_FILES['image']['name'], "text"));
//This code writes the photo to the server//
if(move_uploaded_file($_FILES['image']['tmp_name'], $target))
//And confirms it has worked//
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory";
else {
//Gives error if not correct//
echo "Sorry, there was a problem uploading your file.";
  mysql_select_db($database_dbTroch, $dbTroch);
  $Result1 = mysql_query($insertSQL, $dbTroch) or die(mysql_error());
?>
<!doctype html>
<html>
<meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Troch Project Solutions - Admin - Toevoegen</title>
  <link rel="stylesheet" href="css/foundation.css" />
  <link rel="stylesheet" href="css/layout.css" />
  <!-- Fonts
  ================================================== -->
  <script type="text/javascript" src="//use.typekit.net/vob8gxg.js"></script>
  <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
  <!-- jQuery
  ================================================== -->
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
  <script src="js/vendor/modernizr.js"></script>
</head>
<body>
    <div class="row">
      <div class="large-8 medium-8 small-8 large-centered medium-centered small-centered columns intro">
          <h2 class="subheader text-center">Admin</h2>
          <p><a>Log uit</a></p>
          <p><a href="admin.php">Terug naar Admin menu</a>
          <h4>image toevoegen naar aanbod slideshows:</h4>
          <form action="<?php echo $row_rs_aanbod['']; ?>" method="POST" name="add-photos-aanbod" id="add-photos-aanbod" enctype="multipart/form-data">
          <table>
                <tbody>
                     <tr>
                          <td><label for="image">Kies foto:</label></td>
                          <td><input name="image" type="file" id="image" value="<?php echo $row_rs_aanbod['image']; ?>" /></td>
                    <tr>
                          <td>Sectie:</td>
                          <td><select name="sectie" id="sectie" option value="sectie">
                            <?php
do { 
?>
                            <option value="<?php echo $row_rs_aanbod['sectie']?>"><?php echo $row_rs_aanbod['sectie']?></option>
                            <?php
} while ($row_rs_aanbod = mysql_fetch_assoc($rs_aanbod));
  $rows = mysql_num_rows($rs_aanbod);
  if($rows > 0) {
      mysql_data_seek($rs_aanbod, 0);
      $row_rs_aanbod = mysql_fetch_assoc($rs_aanbod);
?>
                          </select></td> 
                    </tr>
                    <tr>
                        <td><input type="Submit" name="Add" id="add" value="Toevoegen" /></td>
                    </tr>
            </tbody>
        </table>
        <input type="hidden" name="MM_insert" value="add-photos-aanbod" />
    </form>
      </div><!-- end large-8 -->
    </div><!-- end row -->
<script src="js/vendor/jquery.js"></script>
<script src="/js/vendor/fastclick.js"></script>
<script src="js/foundation.min.js"></script>
<script>
            $(document).foundation();
        </script>
</body>
</html>
<?php
mysql_free_result($rs_aanbod);
?>
I cannot work out what is wrong and I would appreciate any help on this. Thanks

Your form field and array variable names do not match
<td><input name="image" type="file" id="image" value="<?php echo $row_rs_aanbod['image']; ?>" /></td>
GetSQLValueString($_POST['file'], "text"),

Similar Messages

  • In MIRO transaction, Where will be the image path get stored?

    Dear Friends,
    In MIRO transaction, Where will be the image path get stored?
    There must be some standard tables/functionality which is maintaining PATH. Please help me to find out the Document Path Details..
    Thanks in Advance.
    Regards,
    Lijo

    Hi,
    this is the content of the oss note (hope it helps):
    Symptom
    Where are the documents that you can create and display using the generic object services (System -> Connections or System -> 'Services for the object') physically stored?
    Solution
    Storing attachments using generic services
    The generic object services offer a separate option via the 'Copy desktop document', 'Connect Internet address (URL)' and 'Create a note' services to add an attachment to a business document.As of Release 4.6C, these services are called 'Create attachment', 'Create an external document (URL)' and 'Create a note'.
    These services should enable the end user to easily enter attachments without document characters (memos).Correspondingly, there is no archiving concept for this type of attachment.
    Technically speaking, notes, PC attachments and URLs are treated as SAPoffice documents and result in corresponding entries in the SOOD and SOFM tables. The contents of the attachments are stored in the SOC3 table.As of Release 4.6B, the contents of PC attachments are stored using the Knowledge Provider (KPro).The KPro allows you to connect an external storage system so that the contents of the PC attachments no longer place a burden on the database. If an external storage system is not connected, the contents of the PC attachments are written to the SOFFCONT1 table as of Release 4.6B.The administrative information necessary to locate the document in the Kpro is in the SOC3 table.
    The content of notes and URLs continues to be stored in the SOC3 table.As these documents are usually small, the additional effort involved in storing them in the KPro is not justified.
    If the PC attachments are not to be stored in the SOFFCONT1 table, you must assign a category to the SOFFPHIO document class using transaction SKPR08. The category is created in transaction OACT and refers to a repository on a HTTP content server. If documents that have already been stored are to be moved to the content server, see note 389366.
    For more information on connecting an external Content Server, see the online documentation for the SAP Knowledge Provider or the information available in the help portal under Basis -> Basis Services -> Business Workplace -> Administration of... -> Information on Documents... -> Configuring an HTTP Content Server for Documents.
    The relationship between the attachments and the business documents is provided via the Object Relationship Service.
    Defining attachments using the archive link
    If an optical archive was connected using the archive link and the corresponding settings for the document type were maintained for the object types of a business document, documents can be stored in the Content Repository, directly from the PC, via the 'Establish relationships for the stored document' or 'Store the business document' service.
    In addition, refer to the online documentation for more information on configuring the archive link.
    Best regards.

  • Dynamic parameter selection from infoview not storing the sql password

    We are having the problem of dynamic parameter selection from infoview not storing the sql password as it does for the actual report. We are using Crystal Reports XI Release 2 version 11.5.3.438 (Not sure of SP level, asked in separate thread).
    To be more specific.
    We have created a report that dynamically populates the parameters of the report by pulling the records from the Informix sql database and allowing selection from there.
    In the Central Management Console for the report object we have set as follows:
    Process - Database:
    Use original database logon information from the report - the sql username and pw etc
    Use same database logon as when report is run
    Process - Parameters
    In selecting a default selection there is the option to put in the sql password, however, this does not stick and clears after update.
    As such the end result is that every time this report is run from infoview and a user chooses a parameter (there are 5), crystal goes through some timeout for about a minute or so and then requests the sql password, if a user then selects the next parameter, the same timeout and password dialog appears.
    We need the crystal report to handle to the sql password for fetching the parameters as well as for the database section of running the report, however, the parameters insists on the end user always putting the password in.
    This is 100% replicatable on our system.
    Any way that we can fix this?
    Will an update fix this issue? If so could you please advise which one?
    Thanks

    Hi,
    I am having the exact same problem. Any help?
    And what does "Use same database logon as when report is run" mean? For me that would be that no prompt is needed for getting values in a dynamic parameter...
    Regards
    Magnus

  • How to display an image, which is stored in a database?

    Hi All,
    I would like to display an image with Web Dynpro.
    I already know how to display an image which is stored in the path src/mimes/Components/...
    But does anybody knows, how to display an image which is stored in a database (e.g. MaxDB)as a datatype of binary?
    Thanks in advance!
    Regards,
    Silvia

    Hallo John,
    yes, you can use the Image UI element.
    Further you have to create a String for the URL. Implement like as follows:
    IWDCachedWebResource cachedResource = null;
    String imgUrl = null;
    WDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute(IPrivateXYView.IXYElement.PIC_DB);
    IWDModifiableBinaryType binaryType =
                   (IWDModifiableBinaryType) attInfo.getModifiableSimpleType();
    binaryType.setMimeType(WDWebResourceType.JPG_IMAGE);//Example *.jpg
    WDWebResourceType type = binaryType.getMimeType();
    byte[] file = wdContext.currentXYElement().getPicDB();
    if (file != null)
    cachedResource = WDWebResource.getWebResource(file, type);
    try
    imgUrl = cachedResource.getURL();
    catch (WDURLException e)
    IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
                        msgMgr.reportException(e.getLocalizedMessage(), true);
    I hope it will help you.
    Regards,
    Silvia

  • Image not storing in SQLite Database

    Hi All
    I am creation an application in WPF C# in which i have created an Ink Canavs 
    now i want to insert the InkCanvas  Data or stockes in SQLite Database for that i hv created an folder in my application
    and on"btnSaveCanvasImg" button Clicked i am saving the image of InkCanvas in a folder and on "btnSaveImgInDatabase" button clicked The saved image stored in the database 
    But when i clicked on"btnSaveCanvasImg" button image saved in folder , but when clicked on "btnSaveImgInDatabase" button the image doesn't store in the database.
    following is my code
    XML:-
    <Window x:Class="InkCanvasInDatabase.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Title="MainWindow" Height="800" Width="600">
        <Grid>
            <InkCanvas Name="MainInkCanvas" HorizontalAlignment="Left" Height="500" VerticalAlignment="Top" Width="595">
                <InkCanvas.Background>
                    <ImageBrush ImageSource="C:\Testimonial_Project\Assets\Images\notePaper.png"/>
                </InkCanvas.Background>
            </InkCanvas>
            <Button x:Name="btnSaveCanvasImg" Content="Save Canvas Image" HorizontalAlignment="Left" Margin="33,599,0,0" VerticalAlignment="Top" Width="200" Height="51"
    FontSize="20" Click="btnSaveCanvasImg_Click"/>
            <Button x:Name="btnSaveImgInDatabase" Content="Save Image In Database" HorizontalAlignment="Left" Margin="281,599,0,0" VerticalAlignment="Top" Width="238" Height="51"
    FontSize="20" Click="btnSaveImgInDatabase_Click"/>
        </Grid>
    </Window>
    C# Code:-
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Navigation;
    using System.Windows.Shapes;
    using System.Windows.Ink;
    using System.Windows.Ink.AnalysisCore;
    using Microsoft.Win32;
    using System.IO;
    using System.Data.SQLite;
    namespace InkCanvasInDatabase
        /// <summary>
        /// Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : Window
            string imagename;
            public MainWindow()
                InitializeComponent();
            public void loadInkAnalyzer()
                InkAnalyzer theInkAnalyzer = new InkAnalyzer();
                theInkAnalyzer.AddStrokes(MainInkCanvas.Strokes);
                AnalysisStatus status = theInkAnalyzer.Analyze();
                if (status.Successful)
                    saveInkCanvasBitmap();
                else
                    MessageBox.Show("Recognition Failed");
            public void saveInkCanvasBitmap()
                RenderTargetBitmap rtb = new RenderTargetBitmap((int)MainInkCanvas.Width, (int)MainInkCanvas.Height, 0,0, PixelFormats.Default);
                rtb.Render(MainInkCanvas);
                BmpBitmapEncoder encoder = new BmpBitmapEncoder();
                encoder.Frames.Add(BitmapFrame.Create(rtb));
               // FileStream fs = File.Open(@"C:\inkCanvas_Images\test.jpg", FileMode.Create);
                FileStream fs = File.Open(@"C:\Users\xeniun1\Desktop\24.02.2015 Xenium_Project\23.02.2015 InkCanvas\InkCanvasInDatabase\InkCanvasInDatabase\InkCanvas_Images\.jpg", FileMode.Create);
                encoder.Save(fs);
                fs.Close();
            public void insertImgInDatabase()
                byte[] signature;
                using (MemoryStream ms = new MemoryStream())
                    MainInkCanvas.Strokes.Save(ms);
                    signature = ms.ToArray();
                string stConn = @"Data Source=inkCanvas_DB.db;Version=3";
                SQLiteConnection sqliteConn = new SQLiteConnection(stConn);
                sqliteConn.Open();
                string sql = "INSERT INTO User_Details (User_Text) VALUES (@Sig)";
                SQLiteCommand comm = new SQLiteCommand(sql, sqliteConn);
                comm.Parameters.AddWithValue("@Sig", signature);
                comm.ExecuteNonQuery();
           private void btnSaveCanvasImg_Click(object sender, RoutedEventArgs e)
                loadInkAnalyzer();
                //MainInkCanvas.Strokes.Clear();
                MessageBox.Show("Ink Canvas Save as Image");
            private void btnSaveImgInDatabase_Click(object sender, RoutedEventArgs e)
                insertImgInDatabase();
                MainInkCanvas.Strokes.Clear();
                MessageBox.Show("Ink Canvas Image saved in Database");
    Plz provide solution for this 
    Regards

    Please close your previous threads by marking helpful posts as answer before you start a new one.
    The type of the image columns should be BLOB. And make sure that you are looking at the inkCanvas_DB.db in the output folder of your .exe ([your_project_foder]/bin/Debug or [your_project_foder]/bin/Debug) because it is this database that the data gets written
    to unless you specify an absolute path in the connection string:
    string stConn = @"Data Source=C:\Your_Project_Folder\inkCanvas_DB.db;Version=3";
    Please upload a reproducable sample of your issue to OneDrive and post the link to it here for further help.
    And please remember to close your threads by marking helpful posts as answer.

  • LinkListExplorer iview BackGround Image path not working

    HI All ,
    As i am using Layout set LinkListExplorer for few external links , when i am giving image name for eg growth.jpg in  background image path,  which is placed at /etc/public/mimes/images it is not showing anything , the same is working for NewsBrowser Layout set  . I have tried many thing all possiblities but no success .
    Pls help me in this regard.
    Shwetang saxena

    Hi Vedant,
    APEX only replaces the #WORKSPACE_IMAGES# variable within APEX itself. This is quite logical, because what you see in the APEX developer space is generated by PL/SQL from the database, so APEX can change what it wants. APEX can't access the files however, that's logical to because APEX would need premissions on the server and an Oracle directoryto start doing changes to files.
    So if you want to point to the image directory in the CSS file you need to provide the full path.
    Regards,
    Joni

  • Image compressed and stored in the database.

    Hi,
    We have a tiff file stored in the database and then compressed using the following Intermedia Oracle method.
    process ('compressionFormat=FAX4,maxScale=1696 2200'); and save it back in the database.
    This oracle database is 8.1.7.4. The tiff file gets processed when we use TIFF file generated by old scanner but errors out with the TIFF file generated by latest scanners.
    The error I get is ORA 29400 , IMG-00704.
    There is a difference in TIFF version in the outputs generated by two scanners,
    The compression option : TIFF modified G3 in the old one
    while the new one has Lempel-Ziv
    Also, the tiff is loaded and saved fine but the image gets corrupted after the intermedia process method is run.

    Thank you for your reply.  I am glad to find that I did not miss an option.  I was aware that I could move my pictures into some other folder, but you have forgotten the solution that I chose.  That was to go back and use ZoomBrowser, which works to access photos in any folder I choose.  In addition it loads promptly.  I have only spent a brief time using the ImageBrowser but don't recall seeing any enhancements that over ZoomBrwoser.  Perhaps if I was attempting to interface with other software but as a stand-alone product, well perhaps you could enlighten me as to what makes ImageBrowser EX a better product..  Regarding the Accept as Solution: are you implying that Canon restricts their search function to only those responses that the OP marks as accepted?

  • Database Initialiser does not create azure sql database

    I have a WPF application In the OnStartup in the app.cs I set the Database initializer and forced the context the initialise my database:
    Debug.WriteLine("Setting Initializer");
    Database.SetInitializer<MyContext>(new MyDatabaseInitializer());
    Debug.WriteLine("Declaring new context");
    using (MyContext c = new MyContext("MyContext"))
    Debug.WriteLine("Force the initialization");
    c.Database.Initialize(true);
    Debug.WriteLine("Done!");
    I created a sql database in the management portal of the azure.
    Copied the connectionstring it provided for ADO.net.
    But my database is not created.
    I also added a firewall rule but nothing happens. I Have no clue what to do.
    Can anybody please help me with this?
    If you need more information please ask i really have to get this sorted out.
    Thanks in advance!

    Hi Turkstra,
    I have tried to use EF to create Azure SQL database, it works as expect, the database 'jambordbcreate' appear in my SQL Azure, below is the detailed codes.
    using System;
    using System.Collections.Generic;
    using System.Data.Entity;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace CodeFirst
    class Program
    static void Main(string[] args)
    Database.SetInitializer(
    new CreateDatabaseIfNotExists<SchContext>());
    using (var db = new SchContext("Server=tcp:****.database.windows.net,1433;Database=jambordbcreate;User ID=vote@***;Password=***;Trusted_Connection=False;Encrypt=True;Connection Timeout=30"))
    string name = "jambor";
    var student=new Student(){Name=name, ID="1a"};
    db.Students.Add(student);
    db.SaveChanges();
    db.Database.Initialize(true);
    public class Student
    public string ID { get; set; }
    public string Name { get; set; }
    public string age { get; set; }
    public string sex { get; set; }
    public class School
    public string ID { get; set; }
    public string Name { get; set; }
    public virtual List<Student> Students { get; set; }
    public class SchContext : DbContext
    public SchContext(string connection):base(connection)
    public DbSet<Student> Students { get; set; }
    public DbSet<School> Schools { get; set; }
    I suggest  you check your SQL connection, after run your code, please refresh azure portal to see whether your database is exist. Hope this give you some help.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • When I select from the LOV, it is not storing in the database

    Have a field (Manager) where the user selects their manager from the select list(generated from the query below)
    select FIRST_NAME || LAST_NAME d, MANAGER_ID r
    from PERSONNEL
    where TITLE = 'MGR'
    order by 1
    After the manager is selected and Apply changes is clicked, nothing is stored to the database.
    Have the Manager field specifications set as:
    Source Used: Only when current value is session state is null
    Source Type: Database column
    Maintain Session State: Per Session
    Source Value or Expression: MANAGER_ID

    Well, how have you created this form... manually or using wizard. If you have used wizard, then it would have asked you to select the table and it would have created process to update the same.
    If you have created this form manually then you need to add a processs to update this to database...
    Regards,
    Shijesh

  • Dreamweaver PHP file not connecting to SQL Database.

    Hi I am using Dreamweaver CC, I have a MYSQL connection set up. I want to create a recordset and when I choose the define my connection option, it comes up with  a pop-up screen the says: 'testing database connection' it loads for some time and then quickly closes down and comes back up immediately. It should be connecting fine and I don't know what to do as it isn't even giving me an error message to work off of! Any ideas? Thanks

    Jana,
    Your TNSNAMES.ORA file will be found in a path similar to this one:
    C:\Oracle\Ora81\NETWORK\ADMIN
    The file may looks similar to this:
    ORA1 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xx.xxx)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = ora1)
    When you log on to SQL*PLUS try:
    USERNAME: system
    PASSWORD: manager
    HOSTNAME: (leave blank)
    If you still get an error, refer to your TNSNAMES.ORA file to see what your host name should be (in my example, it is ORA1).
    If you still get an error after filling in the hostname, launch server manager (C:\Oracle\Ora81\BIN\SVRMGRL.EXE), then try to start the database:
    SVRMGR> CONNECT INTERNAL
    SVRMGR> STARTUP
    Good luck,
    Emily
    [email protected]

  • What is possible in oracle9i which is not possible in sql database

    Dear friends ,
    pls explain me the advantages of oracle9i over sql
    thanks
    senthil

    OK, I'm starting to understand what you are doing. An InDesign Spread can contain up to 10 pages (if you turn off page shuffling and drag them together), and I think with the page tool you can even drag pages together head to foot, though I hate the Page tool and never use it myself.
    I presume these lines must be more or less page boundaries. If printing at home on a desktop printer, you need to allow for the non-imaging area around the edge of the printed page, so for a letter size page you could set up the pages as non-facing at 7.75 x 10.125 with a bleed allowance of .375 all around, then drag them together and place the art across the spread with drawn cutlines on the page borders. Export to PDF with the bleed and you should be golden.

  • Coldfusion 9 will not connect to sql database set up as ODBC

    I've just installed the 64 bit version Coldfusion 9 on a 64 bit Win 7 machine where I have several SQL Server data bases set up with ODBC.
    When I go into CF admin to add a datasource, it will not see the ODBC connections I have set up.
    Unless I find a solution I will have to uninstall this 64 bit version of Coldfusion and try the 32 bit version instead.
    Just a note, these ODBC data sources were set up using c:\windows\sysWOW64\odbcad32.exe
    I hope there is a setting somewhere that I missed.

    Have you considered using JDBC rather than ODBC?  I suspect that both Adobe and Microsoft view ODBC as a legacy technology.

  • Generating sequence numbers not stored in the database

    how to generate row numbers in the select statement
    I need my query to return row numbers as a column which need to be displayed in the front end reporting tool.
    should return something like this..
    RANK NO DEPTID DEPT_NAME
    1 10 SCOTT
    2 10 JAMES
    3 20 PETER

    Something like
    SELECT row_number() over (order by deptid) rank_no, deptid, dept_name
      FROM deptJustin

  • Storing WORD or PDF files in SQL database

    Can WORD document or PDF documents be stored in SQL database?
    If so, how? I would like an example (if possible).
    I do realize that I can store a reference pointer that points
    to a physical file on the server, but I don't want to do
    that.

    You should do a little research on using BLOB data types.
    Repository engine provides interfaces to handle properties that
    are binary large objects (BLOBs) and large text fields. BLOBs are
    properties that have values containing text or image data that can
    be in excess of 64 kilobytes (KB). You can use BLOBs to perform
    database operations that require you to work with large segments of
    data at a time.
    Phil

  • Aperture & iPhoto metadata when images NOT stored in iPhoto

    Thinking of "upgrading" to Aperture from iPhoto '11 - still want to use iPhoto for organization but Aperture for hopefully better editing capabilities, etc.
    Have 30,000+ images with keywords, etc. in iPhoto; the image files are NOT stored IN iPhoto, i.e., they are organized in folders external to iPhoto's library. The iPhoto library file best I can tell stores thumbnails and keyword metadata, etc.
    I'd like to use Aperture and have access to all of iPhoto's keywords, etc. but to use the original photo files.
    Can Aperture be setup to work this way? i.e., to pull in the 30,000+ photos' keywords yet reference the same originals that iPhoto is referencing?
    I don't want to duplicate the 30,000+ originals... In all likelihood I'd only ever want to manipulate a small percentage of the total image library in Aperture.
    Any suggestions appreciated!
    Alex

    Alexander Mcleod wrote:
    Thank you for taking the time to reply...
    re: "Basically to edit an image, stored in iPhoto, in Aperture you would have to export the image from iPhoto import into Aperture modify it export it out of Aperture and import it back into iPhoto."
    My point is that in my case the images are NOT *stored* IN iPhoto...
    Yes I understand, your iPhoto library is setup using referenced masters, the termed used when the master file is stored outside of the programs database. And you could setup Aperture in the same way and they would both be pointing to the same master file, external to both programs databases.
    But here's here's the kicker: The master file *is never modified* by either program. I believe iPhoto makes a copy of the master when you apply adjustments (someone with a greater understanding of iPhoto can correct me here) how it does it isn't important what is important is that he master isn't modified; Aperture also leaves the master alone. It records the adjustments you make as a stream on instructions and applies those to the master when you want to create an adjusted image. What you see (normally) in Aperture's views are previews of the adjusted image. So changes you make in Aperture won't be seen in iPhoto because iPhoto is looking at the original master file, not Aperture's adjusted version.
    Now you can share the preview from Aperture with iPhoto, but at this point you basically have the adjusted image in two places.
    And in reference to the other response that suggests that iPhoto and Aperture use different databases, I'd completely expect that to be the case. What I'm wondering about is can Aperture initialize its database from iPhoto's database; i.e., create its equivalent to iPhoto's "library" file (where all the iPhoto metadata is stored) from iPhoto's AND like iPhoto reference the original files in their original location.
    Yes Aperture can initialize a database of its own based on the iPhoto library and that library can be setup to use referenced masters, see above.
    I don't see why I'd need to 'export' any image from iPhoto (unless of course I'd "edited" it in iPhoto - in which case the *modified* file IS I think stored IN iPhoto's library) but that's my point... I don't WANT to edit the files with iPhoto... I want to edit the files with Aperture.
    You're right you won't need to export from iPhoto if you setup both with referenced masters. But like I said above to get back to iPhoto you will have to export from Aperture unless you can live with using the previews in iPhoto. But again you will basically have two identical library structures, at least at start, as time goes on they will diverge.
    I hope this better clarifies what I'm trying to explain.
    It does, I hope my reply also helps explain the difficulties with this setup and why it's not as cut and dry as it first appears.
    I have read *many* other posts that point out what you're pointing out but they all seem to make assumptions about wanting to modify files in Aperture which were previously *modified* in iPhoto. The unmodified "original" photos (assuming both iPhoto and Aperture have the ability that iPhoto has to reference the original files from a location *external* to iPhoto) are then by definition are already shared between iPhoto and Aperture so there's no need to 'export' from one to the other, no?
    As I've said whats shared is the original unmodified master image. Once either program modifies it it is no longer shared.

Maybe you are looking for