|
Luc Pattyn wrote: Unless you forget about version numbers until you actually need them
You're right. I leave the numbering to my version control provider. Though I understand that someone has to write and maintain the code that implements some numbering scheme.
The OP used the word 'depth' and you are inferring that as 'base 5'. And that may well be the intended assumption, but obviously along with a clear and concise question, there was much more lacking from the post. My use of simple arithmetic was a poor attempt to sarcasticly point that out to him.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
|
1) first of all i want to save a TreeView in database
i designed a table with three fields (ID , NodeName,UpareNodeID)
and create a relation ship with ID and UpareNodeID is it correct?
i want to know if there is a better solution to save and retrieve this kind of collection
2) the second problem : how can i make a relationship from a field to another in the same table in ms access 2007 ?
thanks!
|
|
|
|
|
All the fields in each row in your table, are automatically related to each other, by being in the same row. You can not and do not need to create any relationship.
If you want to relate values from one row to those in another row, you will have to create two tables, and create a relationship between those.
So for example something like:
Table 1: Nodes (ID, NodeName) Where ID is unique
Tabl e2: UpareNodes (ID, NodeName, Parent_ID)
Relation: Nodes.ID = UpareNodes.Parent_ID
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi,
I'm trying to store RTF data inside of Transact-SQL and have used a data type of TEXT, however when retrieving the data from the database all I am receiving is the actual text, all of the RTF markup is gone and I am just receiving plain text.
My question is what should I be using for a data type, since TEXT is not working the way I thought it would.
Thank you,
Glenn
Glenn
|
|
|
|
|
gmhanna wrote: what should I be using for a data type
TEXT will do; it can also hold text with markup, like RTF and HTML.
What property are you writing to the field? Make sure that you're saving the Rtf[^] property to the database, and not the Text[^]. The first will contain all text, with the Rtf-markup. The second property, "richTextBox1.Text", only contains plaintext.
I are Troll
|
|
|
|
|
Hi Eddy,
I have been trying to locate how this is attached. I am using a "Data Source" and the control is bound to the data source. I have been scouring the code trying to see something like rtftextbox.text or rtftextbox.rtf, but I'm not locating it.
This control was placed on the form by dragging the RTF control from the data source and dropping it onto the form. I usually code the SQL stuff by hand but thought the automated tool was cool.
Thank you,
Glenn
|
|
|
|
|
gmhanna wrote: I have been scouring the code trying to see something like rtftextbox.text or rtftextbox.rtf, but I'm not locating it.
That's probably in InitializeComponent() , binding the property.
gmhanna wrote: I usually code the SQL stuff by hand but thought the automated tool was cool.
It can save a lot of boring typing-work, but you'll get surprises like these in return
I are Troll
|
|
|
|
|
I have this line of code in the InitializeComponent() for the binding. I could not find a definition for the word "Text", but I think what you are hinting at is I should try changing this to Rtf?
this.commentsRichTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.reunionBindingSource, "Comments", true));
Thank you,
Glenn
|
|
|
|
|
That should work, but keep in mind that it's a generated file; I don't know whether the designer will pick up the changes correctly.
I are Troll
|
|
|
|
|
Just to be picky, if your using SQL 2005 or later i would use VARCHAR(MAX)
As TEXT has been decpreciated and should be removed in the next version of SQL
Marc Clifton wrote: That has nothing to do with VB. - Oh crap. I just defended VB!
|
|
|
|
|
Thank you for the information. I am currently using SQL Sever 2008 R2, so I'll change it.
Glenn
|
|
|
|
|
hi iam using sql server 2000
i have a table with fields
itemkey nvarchar(50)
amount money
i want the querry when user enters any number like 1000 or 750
i want to display what are the itemkey and the amount equals to exactly
1000
can you give example which helps me
|
|
|
|
|
I hope that I misunderstood your question or that you have simply never written sql before:
SELECT itemkey, amount
FROM a_table_with_fields
WHERE amount = 1000
My advice is free, and you may get what you paid for.
|
|
|
|
|
Your question is not exactly clear.
However, from what I think it means, what you need is one of the most basic of SQL statements SELECT ......WHERE ......
See here[^] for syntax etc.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
hi , i want the querry for a given parameter how much items amount equals to given parameter
|
|
|
|
|
In that case the answer given by Johan should do that.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
The number of matching items can be obtained using the COUNT function:
SELECT count(*) FROM a_table_with_fields WHERE amount = 1000
|
|
|
|
|
Hello,
I have the following sql
SELECT stocksymbol,tradedate, sum(qty )
FROM TradingTransactions where stocksymbol="HINDALCO" group by stocksymbol,tradedate having sum(qty)>1000
In the above query I get the SUM of qty but how do I know which records or record Nos were selected.
Thanks
Pritha
|
|
|
|
|
Just look at the where and having clauses. It is very exact actually. If you want to see which records were used, just run the query without the where and having clauses, and without the sum function, export the whole thing to Excel, and perform the same logic there, using subtotals and auto filters.
My advice is free, and you may get what you paid for.
|
|
|
|
|
thanks for your reply
So do you mean to say that I cant know which records were included in the function through SQL in my database .And will have to go to Excel to find the same.
Pritha
|
|
|
|
|
I think that maybe I do not understand your question.
The where clause determine which records are included and the having clause determines that you don't want to see any dates which' records do not add up to (at least) 1000. That is simple and clear logic.
So if you suspect that this query is not giving you the desired result, you can use Excel as a tool to check the outcome, and visually see each single record.
My advice is free, and you may get what you paid for.
|
|
|
|
|
|
This is a very common problem with MS SQL Server (all versions I think).
Because an Express edition was installed first, you are pretty much screwed. You are going to have to uninstall the express edition, manually delete all the folders it leaves behind, reboot, and install the new version with the advanced services, etc.
For what its worth, this has happened to me twice already. Looking for other solutions will only give you a headache.
My advice is free, and you may get what you paid for.
|
|
|
|
|
I was able to not delete all the folders but did a regedit to clear that.
|
|
|
|