|
What is wrong with the stored procedure?
Software_Guy_123 wrote: We are looking for better performance.
Might not be much else you can do. Maybe relook at how the xml data is being stored/fetched.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
hello frnds,
i have a table having 2 columns of type IMAGE i want to export the data and take it to my office,
i try with export to excel facility but failed.
what can do ????
Is there any other method to export image data...please tell
where i am wrong...?
thaknx in advance
-koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
You need to write some code to take the raw data and convert it into an image format. There are numerous samples around that show how to do this, but without knowing which languages you are familiar with, I can't refine this down for you.
|
|
|
|
|
I'm generally familiar with SQL Server 2005 and I know there's an IMAGE data type that I can use to store pictures in the db. Can MySQL do the same? I'll be heading to the book store tomorrow to pick up a book and read up on this, but any experience in this area, particularly including taking pictures that are saved on my local disk and storing them in a web-based MySQL db would be greatly appreciated. I've seen sample apps for SQL Server 2005 that do this, but not MySQL and get the impression it's not nearly as easy, but probably possible.
Thanks!!
modified on Monday, December 24, 2007 10:29:00 PM
|
|
|
|
|
Mike L. wrote: IMAGE data type that I can use to store pictures in the db. Can MySQL do the same?
Yes. I think it is the blob datatype.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Thanks - I'll go get a book and see if I can find some examples.
|
|
|
|
|
I have a sample around here somewheres. I'll try to find it.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Thanks Paul. I also have the ability to use Access, and have samples for storing & retrieving files from that. Any advantage to MySQL, since I don't have MySQL, but do have Access? i.e., it'll cost me some money to use MySQL, where I can use Access for free, and this is a personal web site for storing photo's, etc.
|
|
|
|
|
Go ahead and use Access. Shouldn't be any problems. Since you are going to be storing photos, the best approach with a database is to save just the path on the server to the photos rather than putting the photos in the database.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
That would certainly make it easier, but won't having a database and an "add picture and keywords" type of functionality make it easier to store, retrieve, and catalog? I have literally thousands and thousands of travel photos from all over the world, and want to be able to give friends and family the ability to search by subject, then return those that match the criteria, which would then show thumbnails, and a click would bring up the full size image....
Thanks for all the help!
|
|
|
|
|
You could still just store the path to the pictures even with searching abilities.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
The logic and the simplicity of that just dawned on me - I still get "protected" storage from the site, and retain search and keyword capbilities. Plus I don't have the overhead of database load/unload and the associated database size issues.
Thanks Paul - that seems to be the most sensible approach and also easiest.
|
|
|
|
|
No problem. Glad it is working out for you
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
using c# ... is driving me insane
it wont let me connect no matter what i do or what incantations i try
can somebody point me to the reqd small animals to sacrifice??
thnx
[edit]
i figured it out ... twisted isnt the word
[/edit]
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
modified on Sunday, December 23, 2007 4:40:10 AM
|
|
|
|
|
Hi all,
following is my yable schema
Tic_pk | Tic_Denom_No | Tic_start_no | Tic_end_no
--------------------------------------------------
100 | 5 |111112411| 111112510
101 | 5 |111112511 | 111112610
102 | 5 |111112611 | 111112710
all i want that when user selects a Tic_denom, a start num and an end number the middle record should also b considered
eg:
tic_denom_no=5
startno:111112411
end no: 111112710
the middle record should also be returned because the start and end of the middle rec also falls in the range..
pls help
thanks in adv
|
|
|
|
|
Maybe something like:
SELECT DISTINCT * FROM YourTable WHERE Tic_Denom_No=5 AND (Tic_start_no > 111112411 AND Tic_end_no < 111112710)
Or something along those lines...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
I have a web site that the DB of it (SQL Server) is created on host but its tables is empty.
I populate tables Locally and now I want to transfer the records from local (My Computer) to Server.
The host don't permit for restore and attach, and if I develope an application for transfering data, a problem occures:
Spot this table(on local):
ID Name
--- -------
1 John
2 Merry
4 Simon
that ID Field, its identity is 'yes'. Now if I want to insert this in server 'simon' gives '3' ID, And this table have relation with other table on 'ID' field?
what should I do?
Best wishes
|
|
|
|
|
You need to disable foreign key constraints (and triggers if needed) before inserting. For SQL Server 2005 this is:
Disable all Constraints:
ALTER TABLE YourTable NOCHECK CONSTRAINT ALL
Disable all Triggers on a table
DISABLE Trigger ALL ON YourTable
Make sure to turn them back on when you are done.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
hi there,
I have a form in which there are three options for phone numbers ie cellphone, office phone and residence phone. The condition is the user is supposed to enter at least one number. My problem is i need to display the details of all the registered candidates in a gridview which has only one column named phone. i dnt knw how to write the query to check which phone number is entered by each candidate and display it. The priority between the phone numbers is given as office phone,cell phone then residence phone
Do anyone have a solution for this????? 
|
|
|
|
|
You haven't stated what database you are using. However, if you are using SQL Server then you can use the COALESCE function. COALESCE returns the first non-null value in a series of values. It checks these values from l-r, so you can define an order of precedence. See the following example:
SELECT COALESCE([office], [cell], [residence]) AS Phone FROM MyTable
Hope this helps.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi i have an access db where i have a check box for new items on the list,
I want to un-check it after viewing that item through my web application.
How do u set a check box to unchecked?
New? is the name of the column where i have the checkboxes.
i thought its like this;
string sql = "INSERT into ([New?])" + " VALUES ( '" + false +"')";
but this doesnt work
thanks
|
|
|
|
|
s3rro wrote: string sql = "INSERT into ([New?])" + " VALUES ( '" + false +"')";
Your query should work if you remove the quotes surrounding the literal value false.
BTW, it's actually a Boolean field. The check boxes are just a presentation feature provided by Access when viewing the contents of the table.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
This query won't update anything. It's an INSERT query, which means it creates new records.
There is also no WHERE clause, so even if you changes the INSERT to UPDATE, it would change ALL of the records in the table, not just the ones that have their [New?] field set to True.
You also don't specify which table your making an update to.
Your column name is also pretty bad. Don't use punctuation marks in table or column names. This will make for some very interesting debugging sessions if you do.
I think your query, assuming you want to change all the records that are tagged "new" to false and your [New?] column is of type "Yes/No", should look something like this:
UPDATE tableName
SET [New?] = False
WHERE [New?] = True
|
|
|
|
|
I don't know which version of Access you are using but in 97 and 2000 I believe true is -1 and false is 0.
So if all else fails with updating the database give these values a go.
Regards
Guy
P.S. Can anyone explain to me why M$ set true to -1 and not 1?
You always pass failure on the way to success.
|
|
|
|
|
I have a table Task which has the primary key as TaskID and a projectID.
I have another Table called Successors which has two fields TaskID and SuccessorID which are both forigen keys from Task.TaskID
What I need to do is create a statement so that All Tasks where proeject ID = X, are deleted if their Task ID is not found in any of the records in the successor table.
Anyone have any ideas?
|
|
|
|