473,440 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,440 software developers and data experts.

varbinary(max) field in sql server 2005 problems

1
Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE Upload
  2. (
  3. uploadid INT IDENTITY(1,1) PRIMARY KEY,
  4. cssid INT NOT Null FOREIGN KEY REFERENCES CourseSemSub(cssid),
  5. teacherid VARCHAR(10) NOT NULL FOREIGN KEY REFERENCES Teacher(teacherid),
  6. description VARCHAR(40),
  7. video VARBINARY(MAX) NOT NULL
  8. )
  9.  
I'm unable to execute the above create table statement. It is giving the following error.
Msg 170, Level 15, State 1, Line 7
Line 7: Incorrect syntax near 'MAX'.

Details:
Upload is the table in my database & CourseSemSub, Teacher are the two other tables earlier created.
I want to store video files in the video field in this Upload table. So i'm trying to make it varbinary(max)[as large as possible] but i'm unable to create the table using above code.
Mar 12 '10 #1
1 3811
MrMancunian
569 Expert 512MB
Weird, if I remove the FK's this query works fine...Can you post the full creation code for the complete database?

Steven
Mar 23 '10 #2

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

Similar topics

2
by: Bill Nguyen | last post by:
I need sample code to insert binary file (mappoint map file) into a varbinary column using VB.NET. Please help! Thanks Bill
18
by: mollyf | last post by:
I just installed SQL Server 2005 on my PC (the developer's edition) yesterday. I have some scripts written by one of my coworkers to create some tables and stored procedures in a database that...
2
by: Marcus | last post by:
(Appologies if this group isn't the best place for this post) Is it possible to use DAO 3.6 to access binary data (varbinary(max)) in Sql Server 2005? I have images and sound in a Sql 2005 DB...
2
by: tindersticks | last post by:
Hi Can someone please post the simplest script that will allow an asp page read and write to/from m a MS SQL varbinary(max) field. ie image or doc/pdf etc is converted to relevant format and...
1
by: Gilad | last post by:
Hi I moved to SQL Server 2005 (from 2000) and noticed there is a better variable to deal with binary arrays. I hava a table that hold 9 columns of images (BLOB). each array has a different size...
4
by: Martin Horst | last post by:
Hi, I've got an application which is written in .Net 1.1. When I try to write a varbinary(max) field using the SqlCommand and SqlParameter classes I got an exception like this: "The...
1
by: quartrj | last post by:
For number of security reasons I can't use the Openrowset - Bulk option does any know of another way to load files into this data type.
1
by: quintonmartin | last post by:
Here's my problem. I have a client application that uses a web service for data access. I can read/update many records in many tables, however, I am not getting what I expect for a varbinary(max)...
7
dbudry
by: dbudry | last post by:
I have a program that I developed that builds an XML file that stores base64binary data from images stored in SQL Server. The XML file along with the schema get transfered, then another program...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.