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
  • Query to get all row values as comma separated

    database sql-server sysadmin help
    2
    0 Votes
    2 Posts
    0 Views
    M
    Here is an example DECLARE @String VARCHAR(1000) SET @String = '' SELECT @String = @String + ',' + Column1 FROM Table1 SELECT @String Never underestimate the power of human stupidity RAH
  • Using access to find the most of records

    help question
    4
    0 Votes
    4 Posts
    0 Views
    D
    Hi Dave, Thanks for the info it was useful, sorry for late reply In the end we're all just the same
  • Login Fail for user 'XYZ'

    help database sysadmin security business
    4
    0 Votes
    4 Posts
    0 Views
    C
    I suspect that it works when you are logged in to DB2 as 'sa', because it attempts to use those same credentials on DB1, it will work since 'sa' also exists in DB1 with the same password. When you login to DB2 with 'XYZ', the same login will be attempted on DB1 and since 'XYZ' doesn't exist on DB1, the login fails. The quick and dirty solution is to replicate the userid on DB1 and I suspect that will allow the link to work. :) 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]
  • How to avoid same ranks while doing a FULLTEXT

    tutorial
    5
    0 Votes
    5 Posts
    0 Views
    J
    Hi Scubapro, Thanks for the reply. But this is not making any difference in the rankings. But we found that the current ranking is somehow ok for us. Thanks for you efforts Regards jophin
  • 0 Votes
    1 Posts
    1 Views
    No one has replied
  • Trigger Issue

    database help sysadmin question announcement
    2
    0 Votes
    2 Posts
    0 Views
    M
    It seems likely that linked servers do not support triggers (spit - I hate triggers) so I would do the following. Do some reading on linked server/triggers (you mey get a definitive answer here). Move the insert to Access out of the trigger and into the proc that inserts into your SQL table. You will miss any inserts that do not go through the proc but is will work. If you have data inserting from another source then track it down and nail it. Never underestimate the power of human stupidity RAH
  • 0 Votes
    4 Posts
    0 Views
    N
    this's just look like when you use File.OpenRead(filename) error will be returned when the file is opening. In my case, if the file is still opening and user can modify the content while I am trying to obtain data. That's bad isn't it? [N][Q][H]
  • Help Me out with this Query

    database help tutorial
    9
    0 Votes
    9 Posts
    0 Views
    N
    Try this Select a.Id, x.BName, x.CName,x.DName From TableA a Join( Select b.B_Id ,BName = b.Name ,CName = c.Name ,DName = d.Name From TableB b Join TableC c On b.C\_Id = c.C\_Id Join TableD d On b.D\_Id = d.D\_Id)x On a.B_Id = x.B_Id Hope this helps Niladri Biswas
  • Technical Aspect of SQL 2k or 2k5 Replication

    database algorithms
    2
    0 Votes
    2 Posts
    0 Views
    L
    Abdul Rahman Hamidy wrote: any reference Here[^] it is :) I are Troll :suss:
  • Generate Script Wizard in SQL 2005/2008

    database csharp asp-net sharepoint
    3
    0 Votes
    3 Posts
    0 Views
    V
    Good Day Holmes Thank you for your kind reply. I don't prefix my procedures with sp, this was only an example. i know red-gate SQL Compare can do that.I was just trying to make sure if the SQL Wizard can generate a Alter when the objects have different code. Thank you once more Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/
  • 0 Votes
    5 Posts
    0 Views
    J
    Well, the idea is to encapsulate database handling to ease change of DBMS (Axapta is not originally created at Microsoft, so it actually supports Oracle too :-) ). There are some options that the Damgaard/Naviosion/Microsoft guys are exposing though. But the only promising field that I can find, is one labeled "ODBC options" which I presume is meant for additional options to a connection string. I haven't been able to find any documentation on valid ODBC options to SQL Server 2008 though... "God doesn't play dice" - Albert Einstein "God not only plays dice, He sometimes throws the dices where they cannot be seen" - Niels Bohr
  • 0 Votes
    10 Posts
    0 Views
    C
    See, it pays off to be lazy sometimes. :) 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]
  • load array data to dataset

    data-structures help
    4
    0 Votes
    4 Posts
    0 Views
    S
    You need to loop through your array of strings and add a new row to your dataset and populate the fields of your new row with your data from the array Example (VB.NET) For idx As Integer = 0 To myArray.Length -1 Dim row as DataRow = myDataSet.Table(0).NewRow row(0) = myArray(idx) myDataSet.Rows.Add(row) Next Steve Jowett ------------------------- Real programmers don't use PL/1. PL/1 is for insecure momma's boys who can't choose between COBOL and Fortran.
  • SQL2000, XML

    help sharepoint database xml
    7
    0 Votes
    7 Posts
    0 Views
    K
    Thank you, It is solved.
  • cursor in pl/sql

    database
    4
    0 Votes
    4 Posts
    0 Views
    D
    Oh My God. Please please please get a dba to do this for you. Dave: But I don't wanna be a barbarian! Fang: You did when you were ten! Dave: Yes, but I thought it meant a librarian that also cuts hair.
  • convert MS SQL DB 2008 to 2005

    database sql-server sysadmin help
    4
    0 Votes
    4 Posts
    0 Views
    E
    Restore a SQL Server 2008 Database into SQL Server 2005 If you've tried to back up a database in SQL Server 2008 and then restore it into SQL Server 2005, you know that the database backups are not backward compatible. However, with SQL Server 2008 Management Studio, you can script data and schemas in SQL Server 2005 mode. This 10-Minute Solution takes you through the steps to back up the Northwind database on SQL Server 2008 and restore it to SQL Server 2005. The Problem: Transferring databases from SQL Server 2008 to SQL Server 2005 is not possible with standard backup and restore facilities. The Solution: Leverage the scripting wizard in SQL Server 2008 to script data as well as schemas in SQL Server 2005 compatibility mode. Using the "Generate SQL Server Scripts" Wizard The Northwind database is no longer shipped as part of the SQL Server installation, but you can download it from go.microsoft.com. The data is scripted as INSERT statements. To create the scripts, you have to run the "Generate SQL Server Scripts" wizard, which you can run within SQL Server Management Studio (once Object Explorer is connected to the appropriate instance) by right clicking on the database and selecting "Tasks –> Generate Scripts." Figure 1 shows the initial dialog to the wizard. Click "Next" and complete the following steps in the wizard to back up the Northwind database on SQL Server 2008 and restore it to SQL Server 2005 Figure 1. Initial Dialog to Generate SQL Server Scripts Wizard: To create your scripts, you have to run the "Generate scripts" wizard. Click "Script all objects in the selected database" (see Figure 2), and then click "Next." Figure 2. Select Database Dialog: Click the "Script all objects in the selected database" option. Amend the script options: Specifically, set "Script for Server Version" to "SQL Server 2005" and set "Script Data" to "True" (see Figure 3). (SQL Server 2000 is also supported.) If you are putting the database on a new instance for the first time, make sure the "Script Database Create" option is set to "True." Click "Next" when you are happy with the options. Figure 3. Choose Script Options Dialog: Set the "Script Data" option to "True." Select "Script to file," select the file name, and choose "Single file" (see Figure 4). Click "Next" for a summary (see Figure 5). Figure 4. Output Option Dialog: Select "Script to file," select the file name, and choose "Single file." Figure 5. Script Wizard Summary: Review your selections for the wizard. Now cl
  • 0 Votes
    3 Posts
    0 Views
    K
    Hi, so what database can I use with c++, they must have put MFC Smart Device applications development with a reason. Does pocket access work (.cdb)
  • Database for iPhone

    question ios database
    3
    0 Votes
    3 Posts
    0 Views
    C
    I love the URL for the first result. www.database4iphone.com[^]. Who'd have thunk? :) 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]
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Problem in Sparql Query

    help database tutorial question announcement
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied