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
  • Composite primary key Table Insertion Problem in SQL

    database help
    2
    0 Votes
    2 Posts
    0 Views
    B
    If a reindexing is going on in that table or the table is being locked by another update/insert that could happen I guess... or maybe a snipper [you are blocking someone else so DBA killed your connection or something like that]
  • 0 Votes
    5 Posts
    0 Views
    D
    thanks. I do that (assign to the result variable the value of executeNonquery) to see if it succeeded. Thanks again.
  • 0 Votes
    2 Posts
    0 Views
    L
    MSDN[^] wrote: SSMSE does not support scheduling administrative tasks by using SQL Server Agent. The SQL Agent isn't available in the Express version[^]. I are Troll :suss:
  • Paramaterised access queries

    database csharp tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    L
    Try it without the quotes round the parameters; This should work: command.CommandText = "SELECT * FROM MEMBERS WHERE fname like '%'+?+'%' AND lname like '%'+?+'%'"; Source[^] I are Troll :suss:
  • selecting first 7 days from database

    question database announcement
    8
    0 Votes
    8 Posts
    0 Views
    M
    David I doubt you are the only one - AR is a required trait for some aspects of development so you are welcome. Never underestimate the power of human stupidity RAH
  • how to send captured WireShark packets to sql database

    database tutorial
    3
    0 Votes
    3 Posts
    0 Views
    T
    so i saved the packets to a excel file. from here i want to write a code that would let me read from that file and send that data to the database but am having problems writing that code to do this .., do you have any reading material on how this can be done
  • 0 Votes
    3 Posts
    0 Views
    M
    Along with the filestream storage you can use the hierarchicyid you define your tree structure but you are going to have a coordination problem between the physical structure and the hierarchy in the table. The filestream will not allow you to move the files via explorer so that would be one benefit. Never underestimate the power of human stupidity RAH
  • Oracle Boolean in a datatable with c#

    csharp database postgresql sql-server oracle
    2
    0 Votes
    2 Posts
    1 Views
    J
    Boolean datatype is not defined by ANSI. So either you'll have to use a number or a char, for example: flag char(1) check (flag in ( 'Y', 'N' ))
  • 0 Votes
    2 Posts
    0 Views
    B
    I am not sure if this changed with 2010, but this article[^] could be useful to you
  • Oracle Installation Setting

    help oracle beta-testing lounge
    4
    0 Votes
    4 Posts
    0 Views
    D
    If you search the Oracle forums you will find several threads discussing this issue. I haven't read them in detail but from what I can gather, the installer doesn't like installing Forms 6 and Oracle 9.2 to the same home location. There are a number of suggestions to work around it in this thread: http://forums.oracle.com/forums/thread.jspa?threadID=340452[^]
  • Criteria for creating a new category table

    question
    2
    0 Votes
    2 Posts
    0 Views
    D
    From a purist standpoint, it would be better to create a parent table like: MessageType ID int, Description Varchar and create a constraint against your Message Table to ensure that only valid message types are created in your table. You won't pay much (if any) performance penalty because your parent table is so small. That's my vote. :cool:
  • 0 Votes
    5 Posts
    0 Views
    Y
    Hi, I could not find a specific hint that solves the problem. Thanks Yuval "The true sign of intelligence is not knowledge but imagination." - Albert Einstein
  • Centralized Query Optimization

    algorithms database performance help
    4
    0 Votes
    4 Posts
    0 Views
    L
    The only examples that I could find[^] are part of a presentation. It seems that osun.org[^] has some good information too, but I didn't dig in deep enough to judge whether it's what you're looking for. Have you considered turning your research-results into a CodeProject-article? :) I are Troll :suss:
  • SQL Query : Multiple joins [modified]

    database help announcement
    2
    0 Votes
    2 Posts
    0 Views
    S
    Hi to get the values for TableC you can use this query: SELECT TableA.NewId, TableB.OldName, TableB.OldAddress FROM TableA INNER JOIN TableB ON TableA.OldId = TableB.OldId; If you want to insert the data from this query into tableC it must be something like this (not really sure): INSERT INTO TableC VALUES (SELECT TableA.NewId, TableB.OldName, TableB.OldAddress FROM TableA INNER JOIN TableB ON TableA.OldId = TableB.OldId); Hope this helps... Regards Sebastian It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
  • Join query

    css database question
    3
    0 Votes
    3 Posts
    0 Views
    P
    i think for this try left outer join so that it get all the farmer even the village is not present for that
  • Floating Point Numbers Stored as Text with Integration Services

    help question
    2
    0 Votes
    2 Posts
    0 Views
    L
    moon_stick wrote: I'm assuming the easier way to go is to figure out why the numbers are occasionally stored as floating point in text - can anyone shed any light? Because $2 divided by three people equals something that's hard to store in binary. It results in 0.666666~, where the length of a byte is limited. A digital representation of a analogue value :) Excell sometimes keeps the "calculated" values without rounding them. Those values are already imprecise, since you can't encode every fraction using a byte. It keeps the unrounded value around, and displays a value with the specified formatting: in this case, a currency with two positions after the decimal-separator. It would be easier to test whether the data can be interpreted as a numeric, and if so, round it by two decimals. Keep in mind that you don't want to use these (formatted) numbers for further calculations; you'd want the original floats for that :) I are Troll :suss:
  • 0 Votes
    2 Posts
    0 Views
    L
    Gawiz wrote: Is there a free/simple way to report the bug to Microsoft Microsoft Connect[^]? Gawiz wrote: Is there a workaround that doesn't involve pre-formatting the input Converting the results, by importing into the SMALLDATETIME and SQLDATETIM4 types and ALTERing the columntype afterwards. I are Troll :suss:
  • 0 Votes
    2 Posts
    0 Views
    M
    So if I understand this correctly you are querying the database, populating the datagridview and wanting to rely on the datagridviews update command to put the data back into the database. This is probably the ultimate corruption of a concept that I have ever seen, when MS supplied the DGV with command methods to do the CRUD work it is designed for retail work (it is a great disservice to the developers as this type of thing happens). What you are doing should be done totally in the database, it should be performed by a stored procedure and never have anything to do with the UI. You need to look into stored procedures and TSQL, data warehousing is always done on the server side. Never underestimate the power of human stupidity RAH
  • Opening A Database Connection [SOLVED]

    database sysadmin help csharp sql-server
    11
    0 Votes
    11 Posts
    0 Views
    realJSOPR
    Solved it (see original post for solution) .45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
  • Consuming a web service using a stored procedure

    database sql-server help career
    2
    0 Votes
    2 Posts
    0 Views
    L
    Are you using MSXML2.XMLHTTP and TSQL, or are you using a CLR-sproc to read the webservice? If you're using the XMLHTTP variant, then you might want to check whether OLE-automation is enabled; sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'Ole Automation Procedures', 1; GO RECONFIGURE; GO Hope this helps :) I are Troll :suss: