|
Hi thanks for your reply. By the way, can you give me some hint how to retrive the photo from the disk for a particular movie ? I really don't know how to use the BLOB .\
Thanks.
|
|
|
|
|
flemmard wrote: By the way, can you give me some hint how to retrive the photo from the disk for a particular movie ? I really don't know how to use the BLOB
You need to store in some sort of binary column. I don't use MYSQL so I really can't say what it calls the column type. (binary, varbinary, image, blob are all common names for this type of thing). When you send it from your application you need to put it in a byte[] (C# := byte array), and when you retrieve it you'll get a byte array back, so you'll have to convert it in and out of a byte array before you can use it. The Bitmap class has the methods to do this for you. (I am, of course, assuming you are using the .NET Framework)
|
|
|
|
|
This sounds like homework, your a very naughty boy.
Create table Movies with movieid, desc, year, etc....
create table actor with actor id, name, etc...
create a MovieActor table which links the two tables Movies and Actor ( it will look like Id, MovieID, ActorID).
The same for directors....
Images is a blob or image files
Blog Have I http:\\www.frankkerrigan.com
|
|
|
|
|
Frank Kerrigan wrote: your a very naughty boy.
Another flashback to Monty Python: He's not the messia, he's a very naughty boy!
|
|
|
|
|
Only messia would say he's not the messia.
Blog Have I http:\\www.frankkerrigan.com
|
|
|
|
|
|
I can't believe I ran it, but looks like a little error in the above script.
The CREATE DATABASE process is allocating 2.00 MB on disk 'Online Mall_Data'.
The CREATE DATABASE process is allocating 1.00 MB on disk 'Online Mall_Log'.
Msg 207, Level 16, State 1, Procedure add_products, Line 25
Invalid column name 'Date_added'.
Msg 207, Level 16, State 1, Procedure update_products, Line 25
Invalid column name 'Date_added'.
I'm not going to debug it for you.
I hope this is a homework project, and not a commercial application you've posted online for the world to see! If you were my employee, I'd be a bit miffed if you'd just posted my database schema online.
You'll probably get better feedback if you stated what your aim was with the logic (giving specific examples), rather than just posting the database script.
ChrisB
|
|
|
|
|
yes it's a homework project
thank you for your time and help
Mohsen
|
|
|
|
|
Jeez - Well, what is it meant to do?
|
|
|
|
|
I think its a database for a MALL, though I'm not sure.
Blog Have I http:\\www.frankkerrigan.com
|
|
|
|
|
Frank Kerrigan wrote: I think its a database for a MALL
That reminds me of a joke:
A pregnant woman realises that she can't look after the identical twins she is expecting so she puts them up for adoption. Many years later she decides that she wants to meet them to see what they are like. She finds out that one has been adopted by a jewish family who named him Amal, the other by a Spanish family who named him Juan. She eventually manages to get in touch with the Spanish family and she meets Juan. However, she was never able to track down the current whereabouts of the Jewish family. She asks her husband how she is ever going to know what Amal looks like and he replied "If you've seen Juan you've seen Amal"!
Boom! Boom!
|
|
|
|
|
Im looking for a query who get result in packages
let me explain
select * from users where codgroup = 1
i get all the user belongs to group 1 (100 users)
i want a query who get the rows by packages ( 10 by 10 users).
I hope you can help me
PD: Only sql statements, not using paging gridview property
keep Learning and you never will be out of date...
|
|
|
|
|
Britney S. Morales wrote: i want a query who get the rows by packages
I don't understand what you mean by "packages"
Do you mean you only want the SQL to return 10 rows at a time?
|
|
|
|
|
Britney S. Morales wrote: i want a query who get the rows by packages ( 10 by 10 users).
PD: Only sql statements, not using paging gridview property
What's a package ? : (stupid answers on a postcard please )
Blog Have I http:\\www.frankkerrigan.com
|
|
|
|
|
I am guessing that you want something like this:
select <code>TOP 10</code> * from users where codgroup = 1 <code>AND </code><code>usersortfield > 'last groups greatest value' ORDER BY </code><code></code><code>usersortfield</code> EXAMPLE:
If you were ordering by LastName, you would do this to get the first 10:
select <code>TOP 10</code> * from users where codgroup = 1 </code><code><code>ORDER BY </code></code><code><code><code></code></code>LastName</code><code> Then, when you want the next 10, you would take the lastname from the last record in the previous 10 and:
select <code>TOP 10</code> * from users where codgroup = 1 </code><code>AND </code><code><code></code><code><code></code></code>LastName <code></code></code><code>> </code><code><code>'</code><font class="messagetitle">Morales</font></code><code>' </code><code><code>ORDER BY </code></code><code><code><code></code></code>LastName
(Of course, you wouldn't use LastName alone, because it isn't unique enough...but you can see what I mean by this example.)
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Eric thats the point, it isnt the answer, but your post given to me a light in the dark,
(its just a sentence)
keep Learning and you never will be out of date...
|
|
|
|
|
I get
"System.NotSupportedException: The method specified is not supported by the current provider."
AdomdClient v8, VS 2003, SQL Server 2000
What's the cause of this and is there any way around it?
Kevin
|
|
|
|
|
I've been retained by a company to create a HIPAA compliant billing file from their current data. The useless government information guide (A useless government manual, how could that be?) they were provided with is about 2 phone books thick and would make an excellent campfire.
Does anyone have any experience working with HIPAA billing files? Any advice would be appreciated - excellent advice would be compensated!
Thanks
John
|
|
|
|
|
just a quickie...
Is there a feature in ms sql server that allows you to setup a stored-proc to be run at predefined times.. Im thinking along
the lines of the "scheduled tasks" in windows where you can choose to run a process every so often.
|
|
|
|
|
you can use sql server agent.
|
|
|
|
|
cheers mate
|
|
|
|
|
You can also use a DTS package (which uses SQL Server Agent)
Blog Have I http:\\www.frankkerrigan.com
|
|
|
|
|
Hi all,
I'm trying to get a couple of remote computers running a UI to be able to access an SQL database behind a VPN firewall. They can get through the VPN successfully but cannot connect to the database, which is set up to do validation via trusted connections.
Any ideas as to how I can set this up please?
|
|
|
|
|
Ensure that the TCP/IP port SQL Server is using is exposed through the firewall.
If you are using SQL Server 2000 you can find this out with the Enterprise Manager:
Right click the server icon for the server you wish to expose. Click Network Configuration. Ensure that TCP/IP is in the Enabled list (if not, seek advice from your Network Admin). Click TCP/IP in the Enabled list and click the "Properties" button below it. It will tell you the default port. You need to open that port on the firewall to see the SQL Server.
|
|
|
|
|
Keberos does not travel well across VPN links. Try using SQL user connections rather than trusted.
Blog Have I http:\\www.frankkerrigan.com
|
|
|
|