Skip to content

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
  • Database Replication

    database help sysadmin hosting tools
    3
    0 Votes
    3 Posts
    0 Views
    U
    I'd have to know a few more details about your infrastructure to provide better feedback as to a course of action. You may want to review this excellent series of concise articles on SQLServerCentral regarding SQL replication and how to choose the correct model for your needs: http://www.sqlservercentral.com/stairway/72401/[^] Best of luck!
  • problem in writing query for particular problem..

    database help sql-server sysadmin
    5
    0 Votes
    5 Posts
    0 Views
    M
    Nope, I have better things to do that your work. [edit] I relent Select * from TableName there you go, just replace tableName with the table name. [/edit] Never underestimate the power of human stupidity RAH
  • Counting records in a dBase III file

    question css database debugging json
    6
    0 Votes
    6 Posts
    0 Views
    F
    I suggest you use Microsoft Visual Foxpro ODBC Driver[^]. It has full compatility with other xBase product (including dBase III+), it is newer, and it has much better handling with SQL queries. hth, foxyland
  • Not sure where to ask this question...

    php database mysql design question
    4
    0 Votes
    4 Posts
    0 Views
    P
    JohnnyG wrote: a mysql database JohnnyG wrote: to handle potentially rapid growth I recommend SQL Server (Express).
  • 0 Votes
    24 Posts
    2 Views
    J
    Trekstuff wrote: Yes I am convinced. I can see it now: A bunch of execs at a board meeting firing up SSMS and just querying happily away If they want unlimited queries that is exactly what is needed and wrapping it in another app doesn't change that. And that is exactly the situation at a bank that I worked at. The VP in charge of the merchant credit services often (more than once a week) did custom queries directly into the production database.
  • 0 Votes
    10 Posts
    0 Views
    P
    I wrote: maybe no locking at all, which would cause your problems. Richard.Berry100 wrote: I also checked the locking settings on the Database.... Oops - they were set to None!!!! No further comment required. Peter Software rusts. Simon Stephenson, ca 1994.
  • Oracle 11g: using cursors inside procedure.

    oracle question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Best way to get PK value of newly created record

    database sql-server sysadmin
    11
    0 Votes
    11 Posts
    0 Views
    J
    Shameel wrote: I've been using them for over a decade and haven't really found any problems. Neither have I. If I remember I will check my SQL 6.5 reference to see what I was using with that (since I have been using SQL Server longer than a decade.) * UPDATE * Yep 6.5 had them so I haven't had any trouble using them for 15 years.
  • 0 Votes
    9 Posts
    1 Views
    J
    Problem solved by just changing the password of the root to another password although the old password was correct but I don't know why I was getting that error.. anyhow, thanks everyone..
  • SQL Enable Identity Insert

    help database sql-server sysadmin cloud
    2
    0 Votes
    2 Posts
    0 Views
    L
    SET IDENTITY_INSERT[^]
  • Joining fields from several tables onto one SSRS report

    sql-server question
    4
    0 Votes
    4 Posts
    0 Views
    M
    It is possible especially if the DBs are on the same server, if they are not then the hassle of linked servers is irritating. Investigate doing the join in code in the report. You can throw the values into variables an manipulte the vars. Never underestimate the power of human stupidity RAH
  • help me!

    database help tutorial career
    4
    0 Votes
    4 Posts
    0 Views
    P
    You're welcome.
  • Transfer Database

    database sql-server sysadmin cloud tools
    6
    0 Votes
    6 Posts
    0 Views
    S
    I think there is edition mismatch between both the database instances where you are trying to backup and restore. Please check the edition of your source instance and destination of target instance. you cannot restore from a higher edition to a lower edition. For Ex- Restoration from standard edition backup to workgroup edition is not possible . sheela DBA
  • 2013 - Lost Connection to mysql during query

    database help mysql
    2
    0 Votes
    2 Posts
    0 Views
    Richard Andrew x64R
    MySQL times out the connection if it is not used for a long time. The best thing to do is to make the connection only when you want to do the query, and then close it. The difficult we do right away... ...the impossible takes slightly longer.
  • Database table creation error

    database com help question
    7
    0 Votes
    7 Posts
    0 Views
    P
    Off-hand I'd guess that it is the GO lines.
  • sql ROLLUP

    database tutorial question
    4
    0 Votes
    4 Posts
    0 Views
    R
    I'll take the 5, thank you, but pass on the buggery, if you don't mind. :-) "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me
  • disallow multiple connections for a login

    sysadmin question
    12
    0 Votes
    12 Posts
    1 Views
    F
    Hi Dan, I don't know what programming language you are using, but here is the logic. I'm sure you can apply it on any language; 1. Create a shared folder with read/write authorization for Everyone on the server. 2. In my apps, every user has their own GUID primary key on the database. 3. Suppose one user has a primary key 0D5FF2C1-9710-47EF-86FE-164E6170EEFD . Each time this user log in to the system, check if there is a text file named 0D5FF2C1-9710-47EF-86FE-164E6170EEFD.TXT in the shared folder on the server. If it doesn't exist, go to step (4). If it exists, try to delete it. If the deletion success, then continue to step (4). If the deletion fail, then other workstation is using this login ID is being used. You might want to show some message and redirect the program flow to the exit routine. 4. Create a text file named 0D5FF2C1-9710-47EF-86FE-164E6170EEFD.TXT on the server and keep it open while the apps is open (don't close the file handle). 5. Upon exit, close the TXT file handle and delete the text file. By locking the handle, as long as the user is login, other client could not delete the file. If the initial client crash somehow, then the lock to the text file would be released by the server OS, thus, other workstation would be able to delete the text file (and login with the user id). Others might have better solution. Yes, this is not a SQL solution. And might not be elegant enough for most programmers/system developer. But it works :) hth, foxyland
  • design a database

    question database design learning
    16
    0 Votes
    16 Posts
    3 Views
    S
    FYI. In the world of libraries it is important to note that a book might be bought multiple times even for the same library. Like when Stephen King comes out with a new book. The library might buy 2 hardback copies that will be kept for a long time, and then they might buy later a set of paperbacks that won't last as long. So, not only do you need a books table but you also need a table called 'items' that track the existence of the multiple copies of the same book. When someone checks out a book they are actually checking out an 'item'. Is this for a real library with patrons or is it a personal library, or an exercise? In my personal library I have some books where I have more than one copy. Each instance has a different reason for being bought twice but that isn't important. If you are doing this for a real public library you might have more things to add. You might also have to study the world of MARC records. http://en.wikipedia.org/wiki/MARC_standards[^] _____________________________ A logician deducts the truth. A detective inducts the truth. A journalist abducts the truth. Give a man a mug, he drinks for a day. Teach a man to mug...
  • Oracle 11g: Dynamic query exception

    help database oracle question
    7
    0 Votes
    7 Posts
    0 Views
    U
    Thanks... I didn't even think about fixing the first base where clause string like that. Much easier. and yeah, I've just been moving through the if statements. I'm sure there's just a quote or something missing.
  • MySql Connection Suddenly Broken

    help announcement csharp database mysql
    3
    0 Votes
    3 Posts
    0 Views
    P
    Hello Mr Holmes, Understood. You have personally helped me in the past and I am gratefull. It is my pleasure to be able to occasionally add a small contribution. Thank you for your reply..Pat