Skip to content
Code Project
CODE PROJECT For Those Who Code

Database

Discussions on database access, SQL, and ADO

This category can be followed from the open social web via the handle database@forum.codeproject.com

17.1k Topics 61.8k Posts
  • DateTime from concatenated string

    question
    3
    0 Votes
    3 Posts
    0 Views
    J
    Got it, thanks for the tip, all working now :)
  • Help with the Following SQl Logic

    csharp database asp-net com
    2
    0 Votes
    2 Posts
    0 Views
    V
    Thanks now i have Changed my Code to look like this and its working perfect in SQl when i test it. select distinct nP.id, nP.NodeID, nP.parent, nP.Description, nRef.ID refParent, np.type from #Nodes nP left outer join #Nodes nRef on nP.Parent = nRef.NodeID -- look up the reference id of the parent order by np.Parent,np.Description,np.NodeID And it returns Nodeid Parent Description Type Curr 89 NULL Compulsory 1 10 90 89 B1052 3 10 4113 89 B1061 3 10 2820 89 One of 2 10 2821 2820 B1054 3 10 2822 2820 B1055 3 10 and its Good thanks. am binding the values to a Tree Control like this public void PopulateTreeFromCurr(int currID) { // CurrStructDataSource calls sp_Traverse_Tree which returns an inordered list of nodes for a tree IEnumerable result = CurrStructDataSource.Select(DataSourceSelectArguments.Empty); // ID, Parent, Child, Description, Level, i int Parent, Child; CurriculumTreeView.Nodes.Clear(); ArrayList CurrNodes = new ArrayList(); if (result != null) { // an ordered set of nodes is given. parent always before current node except for root foreach (System.Data.DataRowView row in result) { TreeNode newnode = new TreeNode(row\["Description"\].ToString(), row\["NodeID"\].ToString()); CurrNodes.Add(newnode); // should setup a lookup between the id given by the ArrayList and that of the node // as we add the nodes, we can set up the hierarchy if (row\["refParent"\].ToString() == "") { // don't have to add the root node to another node-it is the root } else { Parent = Convert.ToInt32(row\["Parent"\]); Child = Convert.ToInt32(row\["ID"\]); TreeNode ParentNode = new TreeNode(); TreeNode ChildNode = new TreeNode(); \[COLOR="DarkOrange"\]\[B\]ParentNode = (TreeNode)CurrNodes\[Parent\];\[/B\]\[/COLOR\] ChildNode = (TreeNode)CurrNodes\[Child\]; ParentNode.ChildNodes.Add(ChildNode); CurrNodes\[Parent\] = ParentNode;
  • Generate combinations for series

    database sql-server sysadmin help tutorial
    4
    0 Votes
    4 Posts
    0 Views
    U
    but my requirement is, i need to work on sql server 2005 only.
  • Replication problem

    help sysadmin database sql-server tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Real time data transfer

    4
    0 Votes
    4 Posts
    0 Views
    A
    Do you mean transfer or replicate? For the former, assuming sql server 2005 or later, useService Broker, for the latter google replication. Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP
  • New memory manager for db4o object database

    csharp java database com json
    2
    0 Votes
    2 Posts
    0 Views
    _
    I think you should pay to advertise like others have to... I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!
  • error with OUTPUT

    csharp sharepoint database visual-studio help
    2
    0 Votes
    2 Posts
    0 Views
    N
    jrahma wrote: sql_command.Parameters.Add("@banner_file", SqlDbType.VarChar); It seems fairly obvious, add a size sql_command.Parameters.Add("@banner_file", SqlDbType.VarChar, 255); only two letters away from being an asset
  • Updating an Access database based on a sub-select

    database question announcement
    4
    0 Votes
    4 Posts
    0 Views
    K
    More on this.. I've just stripped out all but this years dates and run my query which has done exactly as I expected and updated 25 & 28/12. I guess its just baulking at the number of repetitions it has to perform on the full table so I'm on the right track but do need to improve the code.
  • How to Export a SQLExpress Database

    database visual-studio help tutorial
    3
    0 Votes
    3 Posts
    0 Views
    B
    thank you!!! i try it... :-)
  • 0 Votes
    3 Posts
    0 Views
    P
    Mycroft Holmes wrote: be clearer and more explicit with your questions I agree. It was so unclear, only assumptions could be made due to it being so vague. "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
  • Total Newbie Question...

    database question html business learning
    3
    0 Votes
    3 Posts
    0 Views
    P
    I agree with David on the part of getting yourself VS2008 if you do not already have it. Bomb_shell wrote: Am I headed for trouble? Not necessarily so. It will be a valuable learning experience for you and feel free to ask any additional questions you have :D "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
  • Stored Procedure

    question database mysql help
    2
    0 Votes
    2 Posts
    0 Views
    I
    Did you googled , plus on front end which tool are you using try this http://dev.mysql.com/tech-resources/articles/mysql-storedproc.html[^] Best Of Regards, SOFTDEV If you have knowledge, let others light their candles at it
  • How to detect orphaned connections?

    question sharepoint database sql-server sysadmin
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • MySQL

    mysql help question
    4
    0 Votes
    4 Posts
    0 Views
    M
    Have you attempted to do some research, these results looked promising[^] I have no experience with MySQL so this is the best I can do.
  • 0 Votes
    8 Posts
    0 Views
    P
    Instantiate the connection once, but open and close it only as needed.
  • SQL Query...

    csharp database sql-server sysadmin
    6
    0 Votes
    6 Posts
    0 Views
    M
    Well.. When you run this transact-sql statement.. probably you face that the datetime auto reformation like '2009-10-01' to CONVERT(DATETIME, '2009-10-01 00:00:00', 102). You should consider this.. Thanks Md. Marufuzzaman Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you. I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
  • sense these changes immediately and notify my program

    database tutorial question
    4
    0 Votes
    4 Posts
    0 Views
    A
    reza assar wrote: perhaps i have to use "notification service" That would be the best way, its not difficult if you read up about it. Otherwise all I can suggest is polling for changes Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP
  • sending report from sql server 2008

    database sql-server sysadmin help tutorial
    2
    0 Votes
    2 Posts
    0 Views
    A
    You have now had two hours to do this... Google[^] Save your thanks. :) I don't speak Idiot - please talk slowly and clearly I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury Driven to the arms of Heineken by the wife
  • 0 Votes
    3 Posts
    1 Views
    R
    Sujit Mandal wrote: 1.where the mdf file located(is there any folder which is contain .mdf) mdf and ldf file is located on shared folder (for example c:\abc or E:\abc) folder abc is shared which i create programmatically Sujit Mandal wrote: 2.when u r creating .bkp file always use overwrite existing file option. i already check whether there are any file with same name. if yes, then first remove it and after that i create backup file rup28aug@yahoo.co.in Rupesh Kumar Swami Software Developer, Integrated Solution, Bikaner (India) My Company Award: Best VB.NET article of June 2008: Create Column Charts Using OWC11
  • it is wrong with this

    database sysadmin security question
    8
    0 Votes
    8 Posts
    0 Views
    N
    Or he could just learn to debug the code by setting a breakpoint. only two letters away from being an asset