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
  • 0 Votes
    9 Posts
    0 Views
    D
    It's not complaining because the number of rows don't match. It's complaining because the number of columns don't match. See Chris's previous answer for how a suggestion on how to correct the query.
  • VBA combobox value

    question
    3
    0 Votes
    3 Posts
    0 Views
    S
    me.combobox1.text giving he following error: You cannot reference a property or method for a control unless the control has the focus regards, 0 will always beats the 1.
  • Move table from one database to another database

    database question
    4
    0 Votes
    4 Posts
    0 Views
    S
    Create Script to Copy Database Schema and All The Objects – Stored Procedure, Functions, Triggers, Tables, Views, Constraints and All Other Database Objects[^] Have a read of that As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.
  • 0 Votes
    4 Posts
    1 Views
    H
    It needs kind of presentation that what's your data and what you want as a final output. Furthermore AFA I understood the problem I think you need to apply groupby in SQL and then after sort top 3 records among the retrieved result set. further sample data can make me more clear regarding. Regards, Hiren. be good(Help people in CP),do good(Vote if one finds helpful) all will happen good, In case happens bad(You are getting downvote for your best try to help OP) it will be good for later after(Countered with more points by humble member). - Gita sar in context of CP. -So Guys don't care about downvote believe in you.
  • get data in financial year in sql

    database sql-server sysadmin help tutorial
    3
    0 Votes
    3 Posts
    0 Views
    M
    Because each company may have a different fiscal year, you need to actually have a strategy to deal with it in your data structure. there are a number of options! Have a function that converts a date to finscalyear/period (2010/01 = April) Actually store the correct fiscal values with the data. Maintian a "Period" table with all the relevant dates and FK it to your data (we use this method) Never underestimate the power of human stupidity RAH
  • VBA access 2007 recordset

    database help tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    S
    You wrote: set classrecset1 = classdb1.OpenRecordset("select unit_price from contract_details where contract_number = ' " & a & " ' ") Nothing to say without seeing your table. Checkout "contract_number" is that string type or number. If Number type just remove the single quotes.
  • How it is Better to Store Multiple Options

    database question
    6
    0 Votes
    6 Posts
    0 Views
    J
    Richard Andrew x64 wrote: So the choices from A to D will be represented in code by flag enums. That description sounds more like a 'name' to me rather than an enum.
  • Cannot Connect To Database?

    question database c++ sql-server sysadmin
    3
    0 Votes
    3 Posts
    0 Views
    J
    So a summary of the problem is as follows. There is ONE database server - one physical box. On that server there is database A. On that server you created database B. On your client box you CAN do the following with A (NOT B.) - Create an ODBC connection and validate it. - Via a NEW Access database, create a linked table to it And with Database B you CANNOT do the above. Given that we know for sure that is NOT a connection problem (per the other response.) And the driver shouldn't have anything to do with it. What it would suggest to me is that it is one of the following 1. User permissions on the database B. This is most likely. 2. Some odd firewall rules. This is hypothetical but I don't consider it impossible. Such a rule would need to be more than just a standard connection rule.
  • month numbers in sql

    database sql-server sysadmin tutorial question
    6
    0 Votes
    6 Posts
    0 Views
    R
    you can simply use select Month(getdate()) to display month in number.
  • DataType mismatch in criteria expression Access 2007 - VBA

    help question
    3
    0 Votes
    3 Posts
    0 Views
    S
    thanks aloooooot regards, 0 will always beats the 1.
  • Development and production database servers

    database sysadmin algorithms question
    8
    0 Votes
    8 Posts
    0 Views
    J
    vanikanc wrote: Our production and development databases are on the same server, due to the complexity of the system. is there a way, that I could not have the production server active, when I open the database server? I do not want to accidently connect to this. Obviously the best solution is to use two different servers. That precludes other problems as well such as run away queries that cause CPU overload, or timeouts due to long running processes. Myself I test against the database server which runs on my development box. But as noted by others very careful use of users and permissions would entirely preclude overlap.
  • Re-indexing

    question career
    2
    0 Votes
    2 Posts
    0 Views
    D
    Let's take a step back and see what is motivating you to re-index ? Re-indexing a table which does not change much (insert,update,delete) is a waste of time. Maybe you should consider using a threshold, like "fragmentation" to determine when you should re-index. Something similar to disk defragmenter; it analyzes your disk, then recommends you to either defrag or not defrag. Look at this article ... http://www.sql-server-performance.com/articles/per/index_fragmentation_p1.aspx[^]
  • SQL Server row lock

    tutorial database sql-server sysadmin help
    3
    0 Votes
    3 Posts
    0 Views
    D
    If you are using SQL Server, you may want to investigate implementing your own locking logic by using sp_applock. Check this out ... http://msdn.microsoft.com/en-us/library/aa933410(SQL.80).aspx[^]
  • Insert not working ??

    help database question
    2
    0 Votes
    2 Posts
    0 Views
    E
    You made v and c parameter of the query. DoCmd.RunSQL "insert into entities (Entity_Name,Entity_Location) values ('" & v & "', '" & c & "');" Cheers To other readers : Yes I know about SQL injection attacks If you can read this, you don't have Papyrus installed
  • Database table design

    database design question
    10
    0 Votes
    10 Posts
    0 Views
    S
    for each record in X, the amount of numerical feild correspond to sum of records "not more than 900 record" in Z. ie: table Z has more than 900 records (unlimited), but the sum in X is limited to a max number of 900 in Z. Table Z is subjected to quireis, that accour not more than once a day. Regards, 0 will always beats the 1.
  • Database Extraction Help

    help css database sqlite security
    7
    0 Votes
    7 Posts
    0 Views
    C
    I figured that out already 2) Pin pointed that problem 3) Never dealt with databases before 4) NEVER did that and have constantly repeated testing... I'm always encountering one error. 5) SMDH... I ain't even going to respond there.... this is different direction than before. 6) Thanks for the suggestion... With little experience inserting into the database and no clue on how to extract the file is where my problem is.
  • Storing images in oracle 9i

    question database oracle help
    2
    0 Votes
    2 Posts
    0 Views
    M
    noora-m wrote: tried to google about storing the images but no luck I do wonder what you used as the serch criteria, I find pleanty of info with the following oracle 9i store images If there are to be mode than 1 images per bird then you need a separate table for the images with a FK to the birds table. BirdsTable BirdID (PK) BirdName ImageTable ImageID (PK) BirdID (FK) BlobField Never underestimate the power of human stupidity RAH
  • Extracting a blob data file from sqlite

    csharp css database sqlite dotnet
    7
    0 Votes
    7 Posts
    1 Views
    C
    I agree with you but now I'm having problems trying to convert the file back to its original form.
  • 0 Votes
    3 Posts
    0 Views
    T
    This will help you too. How to Perform a SQL Server Performance Audit[^] Identifying performance issues using SQL Server Profiler[^] thatraja **My Tip/Tricks My Dad had a Heart Attack on this day so don't... **
  • SQL Jobs stop

    database sql-server sysadmin agentic-ai performance
    3
    0 Votes
    3 Posts
    0 Views
    S
    Have a look at this[^] As barmey as a sack of badgers Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.