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
  • datagridview in tabcontrol!

    tutorial database question announcement
    2
    0 Votes
    2 Posts
    1 Views
    M
    If your datasource for the datagridviews is the same then naturally the data is the same. You can separate the datasources into bindingsources or copy the dataview to a new table for each datagridview. BTW this should be in the Windows Forms forum. Never underestimate the power of human stupidity RAH
  • 0 Votes
    1 Posts
    1 Views
    No one has replied
  • Take a databse back up with LINQ ?

    csharp database linq tutorial question
    6
    0 Votes
    6 Posts
    0 Views
    M
    Thanks Abhishek Sur. I'm using LINQ, so I've used the following code : public static void GetBackUp() { if (!Directory.Exists(StaticVariables.BackUPFolder)) Directory.CreateDirectory(StaticVariables.BackUPFolder); using (RezaRestaurant.SQL.DataClasses1DataContext dbc = new RezaRestaurant.SQL.DataClasses1DataContext()) { dbc.ExecuteCommand(@"BACKUP DATABASE " + dbc.Mapping.DatabaseName + " TO DISK='c:\\aaa.bak'");//Exception } } and this Exception has occurred : http://www.codeguru.com/forum/attachment.php?attachmentid=25454&d=1253973435[^]
  • Date Problem

    database help workspace
    7
    0 Votes
    7 Posts
    1 Views
    S
    thanks :rose: Syed Shahid Hussain
  • SELECT INTO or CREATE TABLE

    database question csharp help
    3
    0 Votes
    3 Posts
    1 Views
    B
    Blikkies, Thanks for the info. Just a couple follow up questions. So on the 2005 SQLExpress Server I have an instance of SQLEXPRESS and on 2008 SQL I have an DB instance of MY2008DB I would do the following if I am running on the 2008 system. EXEC sp_addlinkedsrvlogin '\\MY2005Server\SQLEXPRESS', 'false', 'sa', 'sa', 'sa' SELECT INTO [MyDatabase2].[dbo].[mytable] FROM [\\MY2005Server\SQLEXPRESS].[Mydatabase1].[dbo].[mytable] and if I was running this on the 2005 server it would be the opposite ? EXEC sp_addlinkedsrvlogin '\\MY2008Server\MY2008DB', 'false', 'sa', 'sa', 'sa' SELECT INTO [\\MY2008Server\MY2008DB].[MyDatabase2].[dbo].[mytable] FROM [Mydatabase1].[dbo].[mytable] Or how does that work with the DB Instance name ? thanks
  • Synchronization

    database sql-server sysadmin cryptography help
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Trying to copy a SQL server 2005 database

    database sql-server sysadmin help question
    3
    0 Votes
    3 Posts
    3 Views
    J
    And that'll preserve all my access control and so on? OK, thanks - will do.
  • Display few columns in datagridview.

    tutorial question career
    3
    0 Votes
    3 Posts
    1 Views
    S
    simple just do it gv.Cloumns["YourColumnsName4hide"].Visible = False that's it Syed Shahid Hussain
  • Queries On SQL Job [modified]

    sql-server sharepoint database com help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Query Problem

    help database question
    7
    0 Votes
    7 Posts
    1 Views
    D
    Bah...at first glance I thought this was unanswered....in any case, drop the '' inside your IN and give it a list of separate values - sounds like that's already fixed ya right up... -Dave
  • How to Optimize MySql Database?

    database code-review csharp asp-net mysql
    4
    0 Votes
    4 Posts
    0 Views
    D
    OK, so your DB started performing poorly after it ran for awhile....that's a pretty broad problem, but here's a few things you might try: 1) I fully agree with Bob's post - if you want it to work correctly, get someone who knows what they're doing to set things up properly. (Though I understand that doesn't fix your problem today.) 2) Check for any tables that have grown excessively large. It's possible that you have some large logging / history tables and such that can easily be archived and deleted from the working tables. 3) If there's any way to narrow your problem down to a few areas (perhaps the top 2 or 3 stored procedures you're having trouble with?) you can look at modifying indexes specifically to help with those queries - just be sure you don't replace one problem with another. 4) You could always throw more hardware at it for a temporary fix... If you have any more specifics about what the problem is, perhaps we could better help. -Dave
  • 0 Votes
    4 Posts
    1 Views
    D
    Thanks, Bob...just wish there was a different answer. The more I think about this though, it just seems that there really should be some way to do a sub-query against a stored proc's result set from SQL Server management studio without having to define specific tables, or do anything funky like parsing the SP to auto-create a result table. Perhaps I just need to add this into a feature request for MS. Just in case...anyone else have a suggestion on how to narrow down the results of a stored proc from within Management studio? Something like being able to run a query against the results window sure would be handy. Thanks, Dave
  • 0 Votes
    3 Posts
    0 Views
    J
    You can even do what abishek said, with a simple batch file, and a scheduled task. My advice is free, and you may get what you paid for.
  • How we can handle mails if exchange server is down

    database sysadmin
    7
    0 Votes
    7 Posts
    1 Views
    A
    ohh sorry i dont know...i don't do it intensionally
  • SQL AZURE Service

    database cloud csharp sharepoint com
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Deleting using InnerJoin

    help sharepoint
    5
    0 Votes
    5 Posts
    0 Views
    N
    Yes, it does. :)
  • What DB Engine to use in VB.NET Project

    csharp database mysql sql-server
    2
    0 Votes
    2 Posts
    1 Views
    M
    Member 3108667 wrote: but multi-user ready, about 10 users I would go for SQL Server (Express). This gives you the chance to extend your application to n folds in future with no effort in programming and by just changing the express version to the proper SQL Server. Hope this helps. :) Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
  • Database Mirroring

    help database sysadmin security cryptography
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Oracle Query

    help database oracle question
    2
    0 Votes
    2 Posts
    1 Views
    S
    step 1 : create a Table types named "DIVISION_ARRAY" CREATE TYPE "DIVISION_ARRAY" AS TABLE OF VARCHAR2(12) step 2 : execute the below procedures CREATE OR REPLACE FUNCTION "UNPACKDIVISIONARRAY" (Source IN VARCHAR2 DEFAULT NULL, Delimiter IN CHAR DEFAULT ',') RETURN division_array PIPELINED IS l_list varchar2(32767) := Source; l_idx pls_integer; l_value varchar2(32767); BEGIN loop l_idx := instr(l_list,Delimiter); if l_idx > 0 then pipe row(substr(l_list,1,l_idx-1)); l_list := substr(l_list,l_idx+length(Delimiter)); else pipe row(l_list); exit; end if; end loop; return; end UNPACKDIVISIONARRAY; step 3 : execute the below sql to see the result Select column_value from TABLE(UNPACKDIVISIONARRAY('111,113')) hope that this will help you. regards, Sumith Koshy Thankan, OASYS Information Technology. Dubai
  • SSRS and Local Report

    sql-server tutorial question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied