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
  • Migrating From SQl 2005 to 2008

    database question code-review
    6
    0 Votes
    6 Posts
    1 Views
    E
    Hello, It is best practise to run Upgrade Advisor before starting an upgrade. Please refer to SQL Server 2008 Upgrade Advisor download links. I have done this upgrade a few times without any problem. I hope it will be easy for your case also
  • 0 Votes
    3 Posts
    0 Views
    L
    siaswar wrote: in vs 2008 I had no problem. You're using Sql Ce by the looks of it. There might be different versions[^] of the SqlCe driver on your system. siaswar wrote: what kind of database is better to use in simple program: local? or in localhost? Since SqlCe is serverless, I'm assuming that you're comparing SqlCe and SqlExpress. If you're just going to store some data that could have been in a text-file, go for SqlCe. If you need a real database, go for Express. I are Troll :suss:
  • Looking For… Top Money To Be Earned-high Volume (SZ-1462)

    com
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Can't connect to database file ( mdf )

    csharp database wpf linq help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    14 Posts
    0 Views
    D
    I came across the same problem and I wrote up a little VBA code in ACCESS handle this. It is still in the beta phase and I am still pretty week in the code formating and documenting code, but the functionality is all there. So far it has the following features: - File Folder Scanning and Keyword Search - Batch excel file scanning - Semi-Automatic ACCESS database creater from EXCEL. - Data Viewer with column order, and sizing - ACCESS data filter - Export to excel based on the ACCESS data filter. Again it is in the beta phase. Email me at david.lario@ualberta.net if you want me to forward what I have to you. If there is enough interest I could try post the routine to the code project.
  • RepRbld.exe SQL Server 7

    database sql-server com sysadmin question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • MSSQL Triggers

    database sql-server help
    3
    0 Votes
    3 Posts
    0 Views
    M
    Triggers are valid for events, select is not considered an event. Besides triggers are EVIL :mad:. I'm curious as to the requirement for a trigger on a select, why do you need it Never underestimate the power of human stupidity RAH
  • 0 Votes
    3 Posts
    0 Views
    P
    meerabhuva wrote: WriteCategory - int - metadata value ( Binary number for eg. 2) That's one way, but it will limit you to thirty-two categories. Better to have a Category table and allow many-to-many relationships with Books and Authors. Category ID Description 1 Mystery 2 Romance 3 Sci-Fi Author ID Name 1 Douglas Adams AuthorCategory AuthorID CategoryID 1 3 <-- Douglas Adams + Sci-Fi Book ID Title 1 The HitchHikers... BookCategory BookID CategoryID 1 3 <-- The HitchHikers... + Sci-Fi
  • Overwrite insipte of appending ?? why ??

    help database json question
    5
    0 Votes
    5 Posts
    0 Views
    S
    Thanks for your follow man, but seems that we r not on the same channel.. :confused: jschell wrote: You are putting the data some place - that is data source two. Putting data in some place , could be considered as Data Source ??? i dont know :doh: jschell wrote: 1. Get data - put it in a collection of some sort. 2. Write the data - by using the collection. U i tried to use 2 recordsets also didnt work, u mean that they should be done in two events ?? Any article?? any explanation ?? any examples ?? if you can provide .... most thanksfull :) 0 will always beats the 1.
  • 0 Votes
    3 Posts
    0 Views
    C
    Replace "exec sp_executesql @SQL" with: declare @xml xml set @SQL = 'set @xml =('+@SQL+')' -- stores query result to @xml variable exec sp_executesql @SQL,N'@SQL nvarchar(4000),@xml xml OUTPUT',@SQL,@xml OUTPUT --- display result print convert(varchar(MAX),@xml)
  • When to NOT normalize?

    database sales question sql-server sysadmin
    12
    0 Votes
    12 Posts
    0 Views
    L
    Naerling wrote: Instead he said I should've made 1 extra (maybe he reads this forum too?) Would've been quite the surprise if he'd mixed into the discussion :) Naerling wrote: Don't start about on On Error Resume Next.. :-\ I are Troll :suss:
  • Must Declare Scalar variable

    sharepoint database sysadmin help
    12
    0 Votes
    12 Posts
    0 Views
    A
    Sir, Since you told me so i was trying to reinstall the software but i had some problem with some components 1- MSXML6 2- SQL Server Database Services what can be the reson Call me "Abu AlHassan", Please.
  • 0 Votes
    2 Posts
    0 Views
    L
    Tridip Bhattacharjee wrote: please help me......urgent. I don't see anything urgent here. However, if you read the XML specification you may notice that node names may not contain spaces, so your Emp ID label has been manipulated to make it comply with the rules. I must get a clever new signature for 2011.
  • SQL and Joining in sql server2005

    database sql-server sysadmin tools help
    4
    0 Votes
    4 Posts
    0 Views
    P
    Pivot is a new relational operator introduced in SQL 2005. You can use it to achieve the result. Refer http://msdn.microsoft.com/en-us/library/ms177410.aspx for more information
  • Replacing ' in a string

    database csharp mysql help question
    6
    0 Votes
    6 Posts
    2 Views
    R
    Use parameters instead to prevent SQL Injection
  • 0 Votes
    4 Posts
    0 Views
    D
    I'm afraid you won't be able to directly create a task through SQL Server, but I'm not an absolute expert at your requirement. However, this is how I might approach the problem. 1) In TSQL, there is a command called, xp_cmdshell, which allows you to execute a command shell 2) Create a command-line application that would take as command line parameters the values you need to create a Task. There are significant security issues related to enabling xp_cmdshell, so you may want to evaluate those issues first.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Little help needed with a Stored Proc

    database security help question career
    5
    0 Votes
    5 Posts
    1 Views
    M
    I think this is what you need. Just fill the blanks.... -- ============================================= -- Author: Martin Arapovic -- Create date: 19.01.2011 -- Description: .... -- ============================================= CREATE PROCEDURE InsertUserData ( -- Add the parameters for the stored procedure here -- Define needed parameters -- Contact Input Data @Street VARCHAR(50), @City VARCHAR(50), @State VARCHAR(50), @EmailAddress VARCHAR(50), --Users Input Data @UserName VARCHAR(25), @Password VARCHAR(25), -- User Input Data @FirstName varchar(50), @LastName varchar(50), @Sex varchar(50) -- Add other paramas if you have any ) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; DECLARE @ContactID INT DECLARE @AuthenticationID INT -- -- Note: This is only skeleton of the proc that you want to implement -- -- Do all in one transaction BEGIN TRANSACTION -- -- Insert Contact data and get ContactID INSERT INTO [Contact] ([Street] ,[City] ,[State] ,[EmailAddress]) VALUES (@Street ,@City ,@State ,@EmailAddress) -- GET CointactID SET @ContactID = SCOPE_IDENTITY() -- -- Insert Authentication data and get AuthenticationID INSERT INTO [Authentication] ([UserName] ,[Password]) VALUES (@UserName ,@Password) -- GET Authentication SET @AuthenticationID = SCOPE_IDENTITY() -- -- Insert Users data into users table. INSERT INTO [Users] ([FirstName] ,[LastName] ,[Sex] ,[AuthenticationID] ,[ContactID]) VALUES (@FirstName ,@LastName ,@Sex ,@AuthenticationID ,@ContactID) -- Commit COMMIT TRANSACTION -- This is the general example and you need to add error handling and -- other bussines logic if you have any... :) END GO
  • Compare table data on two different databases

    question
    8
    0 Votes
    8 Posts
    0 Views
    L
    vanikanc wrote: Is there a way to compare data of the same table in two different databases? Yes! Multiple! What have you Googled? On a more serious note, RedGate has a nice tool that could help out. vanikanc wrote: Thanks! You're welcome :)
  • bcp command

    database help question
    2
    0 Votes
    2 Posts
    0 Views
    P
    Try this one : declare @rc varchar(8000) select @rc = 'bcp "select col1, col2 from hqsqlsrvr.web_ref.dbo.anytable_USA" out c:\anytable_usa.dat -c -T' exec xp_cmdshell @rc Putting the query in double quote may solve the problem..