Question

How do I add images to the last columns named Product_Image and Product_Thumbnail? Need code for...

How do I add images to the last columns named Product_Image and Product_Thumbnail? Need code for stored procedure and code behind if needed.

TABLE INFO

CREATE TABLE [dbo].[ExampleTable] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Product_ID] VCHAR (50) NOT NULL,
[Product_Name] VCHAR (50) NOT NULL,
[Product_Image] IMAGE NULL,
[Product_Thumbnail] IMAGE NULL,
PRIMARY KEY CLUSTERED ([Id] ASC)
)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

You will need to store the image in the database as a BLOB. LONGBLOB datatype in mysql will work.

CREATE TABLE [dbo].[ExampleTable] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Product_ID] VCHAR (50) NOT NULL,
[Product_Name] VCHAR (50) NOT NULL,
[Product_Image] LONGBLOB NULL,
[Product_Thumbnail] LONGBLOB NULL,
PRIMARY KEY CLUSTERED ([Id] ASC)
);

Add a comment
Know the answer?
Add Answer to:
How do I add images to the last columns named Product_Image and Product_Thumbnail? Need code for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a select statement that returns the vendorname and paymentsum of each vendor, where paymentsum is...

    Write a select statement that returns the vendorname and paymentsum of each vendor, where paymentsum is the sum of the paymentotal column. Return only the top ten vendors who have been paid the most and the number of invoices is >5. CREATE TABLE InvoiceArchive InvoiceID int NOT NULL, VendorID int NOT NULL InvoiceNumber varchar(50) NOT NULL, InvoiceDate smalldatetime NOT NULL, Invoice Total money NOT NULL, Payment Total money NOT NULL, CreditTotal money NOT NULL, TermsID int NOT NULL, InvoiceDueDate smalldatetime...

  • Part I. Create a library check-out database using Microsoft SQL Server that stores data about books,...

    Part I. Create a library check-out database using Microsoft SQL Server that stores data about books, patrons, and the check-out process. Books (BookID, BookName, Author, YearPublished) Patrons (PatronsID, PatronsName, PatronsAddress, PatronsBirthday) CheckInOut (TransactionID, PatronID, BookID, CheckOutDate, NumDay, ReturnDate, Late, Fees, Paid) - the NumDay field contains the number of days patrons can keep the book, if the return date is over the number of day, then the Late field will have a Y value and a fee of $1.00 per...

  • /* I am executing following SQL statement for the below code but I am getting error....

    /* I am executing following SQL statement for the below code but I am getting error. Pls, upload screenshot after running it. SQL Statement: SELECT OfferNo, CourseNo FROM Offering WHERE OfferTerm = 'Sum' AND OfferYear = 2012 AND FacSSN IS NULL; */ CREATE TABLE STUDENT( StdSSN INT NOT NULL PRIMARY KEY, StdFName VARCHAR2(50), StdLName VARCHAR2(50), StdCity VARCHAR2(50), StdState VARCHAR2(2), StdZip VARCHAR2(10), StdMajor VARCHAR2(15), StdYear VARCHAR2(20) ); CREATE TABLE FACULTY( FacSSN INTEGER NOT NULL PRIMARY KEY, FacFName VARCHAR(50), FacLName VARCHAR(50), FacCity...

  • Someone Please Help Me modify this in PHP I'm in desperate need I cant figure this out ... Make t...

    Someone Please Help Me modify this in PHP I'm in desperate need I cant figure this out ... Make the following modifications: For the vendors table: Comment out the table-level primary key Change the VendorIDcolumn to be a column-level primary key Add a VendorEmail column to the bottom of the table definition (define the data type for the column as variable character and set it to not exceed 45 characters) After the lineItems table, add code to create a table...

  • please write in python. thank you In this question you will be writing the code to...

    please write in python. thank you In this question you will be writing the code to carry out a query on a database table in Python. The CREATE command shown below is given just for your reference, so that you know the structure of the table and its columns. The database is an SQLite database in the file named taxa.sqlite. create table species ( id int primary key, genus varchar ( 5 0 ), species varchar(50), common_name char(100) ) Write...

  • Pleas help I need to create and array to add to my code something like this...

    Pleas help I need to create and array to add to my code something like this for (i = 0; i < NUM_THREADS; ++i) { thr_data[i].tid = i; if ((rc = pthread_create(&thr[i], NULL, thr_func, &thr_data[i]))) { fprintf(stderr, "error: pthread_create, rc: %d\n", rc); return EXIT_FAILURE; ::::::::: CODE ::::::::::::: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <pthread.h>    int sharedVar = 0; pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* thread handler */ void *threadHandler(void *vargp) {    int i = 0;    pthread_mutex_lock(&mutex);   ...

  • NEED TO ADD COMMENTS ON WHAT EACH PIECE OF SQL CODE DOES CREATE TABLE Production.ProductAuditTrail (AuditID...

    NEED TO ADD COMMENTS ON WHAT EACH PIECE OF SQL CODE DOES CREATE TABLE Production.ProductAuditTrail (AuditID INT IDENTITY(1,1), AuditDate DATETIME NOT NULL, ChangeUser SYSNAME NOT NULL, ProductID INT NOT NULL, BeforeListPrice MONEY NOT NULL, AfterListPrice MONEY NOT NULL) GO CREATE TRIGGER tu_ProductAuditTrail ON Production.Product FOR UPDATE AS INSERT INTO Production.ProductAuditTrail (AuditDate, ChangeUser, ProductID, BeforeListPrice, AfterListPrice) SELECT GETDATE(), SUSER_SNAME(), i.ProductID, d.ListPrice, i.ListPrice FROM inserted i INNER JOIN deleted d ON i.ProductID = d.ProductID GO SELECT * FROM Production.ProductAuditTrail GO UPDATE Production.Product...

  • Lesson 10Create the DEPARTMENT tables based on the following: Column Name   ID      Name Data Type     Number...

    Lesson 10Create the DEPARTMENT tables based on the following: Column Name   ID      Name Data Type     Number Varchar2 Length        7      25 Populate the DEPARTMENT table with data from the DEPT table. Include only columns that you need. Create the EMPLOYEE table based on the following table chart: Column Name    ID      LAST_NAME     FIRST_NAME     DEPT_ID Data Type      Number Varchar2      Varchar2       Number Length         7       25            25             7 Modify the EMPLOYEE table to allow for longer employee last names. Confirm your modification. Confirm that both the...

  • Please Explain why I am getting this error from the code below. ORA-06550: line 1, column...

    Please Explain why I am getting this error from the code below. ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'P_PRODUCT_INFORMATION' I have tried changing everything. Code is below. Table to use: CREATE TABLE ProductTable(     ProductID INTEGER NOT NULL primary key,     ProductName VARCHAR(50) NOT NULL,     ListPrice NUMBER(10,2),     Category INTEGER NOT NULL ); / INSERT INTO ProductTable VALUES(299,'Chest',99.99,10); INSERT INTO ProductTable VALUES(300,'Wave Cruiser',49.99,11); INSERT INTO ProductTable VALUES(301,'Megaland Play Tent',59.99,11); INSERT...

  • SQL problem solving help; First 3 tables are finnished; Need help understanding on how to do...

    SQL problem solving help; First 3 tables are finnished; Need help understanding on how to do steps after. First 3 tables are after the first 2 images for reference if needed. //1// CREATE TABLE kr_customer ( Name VARCHAR(40) NOT NULL PRIMARY KEY, City VARCHAR(20), Status CHAR(1) ); //2// CREATE TABLE kr_salesperson ( Name VARCHAR(40) NOT NULL PRIMARY KEY, Age INT, Salary DECIMAL(8, 2) ); //3// CREATE TABLE kr_order ( Order_Number number(3) NOT NULL PRIMARY KEY, Customer_Name VARCHAR(40), Salesperson_Name VARCHAR(40), Amount...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT