Click here to Skip to main content
15,888,322 members
Home / Discussions / Database
   

Database

 
QuestionAdding multiple columns with condition Pin
simpledeveloper26-Dec-19 14:58
simpledeveloper26-Dec-19 14:58 
AnswerRe: Adding multiple columns with condition Pin
Mycroft Holmes26-Dec-19 19:58
professionalMycroft Holmes26-Dec-19 19:58 
AnswerRe: Adding multiple columns with condition Pin
Jörgen Andersson27-Dec-19 3:40
professionalJörgen Andersson27-Dec-19 3:40 
GeneralRe: Adding multiple columns with condition Pin
simpledeveloper27-Dec-19 5:29
simpledeveloper27-Dec-19 5:29 
GeneralRe: Adding multiple columns with condition Pin
Jörgen Andersson27-Dec-19 5:32
professionalJörgen Andersson27-Dec-19 5:32 
GeneralRe: Adding multiple columns with condition Pin
simpledeveloper27-Dec-19 8:44
simpledeveloper27-Dec-19 8:44 
QuestionCrystal Report to SQL server 2012 database Pin
Member 1447460719-Dec-19 10:39
Member 1447460719-Dec-19 10:39 
QuestionBackup rows tables of SQL Server database by SMO base on colums's value Pin
Member 1417466417-Dec-19 14:39
Member 1417466417-Dec-19 14:39 
AnswerRe: Backup rows tables of SQL Server database by SMO base on colums's value Pin
Richard Deeming17-Dec-19 23:47
mveRichard Deeming17-Dec-19 23:47 
GeneralRe: Backup rows tables of SQL Server database by SMO base on colums's value Pin
Member 1417466417-Dec-19 23:57
Member 1417466417-Dec-19 23:57 
AnswerRe: Backup rows tables of SQL Server database by SMO base on colums's value Pin
David Mujica18-Dec-19 5:58
David Mujica18-Dec-19 5:58 
GeneralRe: Backup rows tables of SQL Server database by SMO base on colums's value Pin
Member 1417466418-Dec-19 14:35
Member 1417466418-Dec-19 14:35 
GeneralRe: Backup rows tables of SQL Server database by SMO base on colums's value Pin
David Mujica19-Dec-19 9:37
David Mujica19-Dec-19 9:37 
GeneralCode converter Pin
David Mujica19-Dec-19 9:47
David Mujica19-Dec-19 9:47 
I used a this free Online tool: Code Converter C# to VB and VB to C# – Telerik[^]
public void ExportTable()
{
    SqlDataReader rdr = null/* TODO Change to default(_) if this is not a reference type */;

    using (StreamWriter SW = new StreamWriter(@"c:\temp\zMyTable.txt"))
    {
        using (SqlConnection sqlconn = new SqlConnection("<put your connection string here>"))
        {
            sqlconn.Open();

            using (SqlCommand sqlcmd = new SqlCommand("SELECT * FROM <some desired table>", sqlconn))
            {
                rdr = sqlcmd.ExecuteReader;
                while ((rdr.Read))
                    ReadSingleRow(SW, "~", rdr);
                rdr.Close();
            }
        }
    }
}









Convert Code 

public void ExportTable()
{
    SqlDataReader rdr = null/* TODO Change to default(_) if this is not a reference type */;

    using (StreamWriter SW = new StreamWriter(@"c:\temp\zMyTable.txt"))
    {
        using (SqlConnection sqlconn = new SqlConnection("<put your connection string here>"))
        {
            sqlconn.Open();

            using (SqlCommand sqlcmd = new SqlCommand("SELECT * FROM <some desired table>", sqlconn))
            {
                rdr = sqlcmd.ExecuteReader;
                while ((rdr.Read))
                    ReadSingleRow(SW, "~", rdr);
                rdr.Close();
            }
        }
    }
}

GeneralRe: Code converter Pin
Member 1417466419-Dec-19 16:01
Member 1417466419-Dec-19 16:01 
AnswerRe: Backup rows tables of SQL Server database by SMO base on colums's value Pin
Member 1417466430-Jan-20 22:40
Member 1417466430-Jan-20 22:40 
Questionms sql server error 18456 on sa login Pin
pwojtysiak17-Dec-19 0:24
pwojtysiak17-Dec-19 0:24 
AnswerRe: ms sql server error 18456 on sa login Pin
Richard Deeming17-Dec-19 1:33
mveRichard Deeming17-Dec-19 1:33 
QuestionSQL Server Management Studio VS SQL Server in Visual Studio 2019 Pin
Ebrahimaw21-Nov-19 19:33
Ebrahimaw21-Nov-19 19:33 
AnswerRe: SQL Server Management Studio VS SQL Server in Visual Studio 2019 Pin
Richard MacCutchan21-Nov-19 21:36
mveRichard MacCutchan21-Nov-19 21:36 
QuestionRe: SQL Server Management Studio VS SQL Server in Visual Studio 2019 Pin
ZurdoDev22-Nov-19 9:36
professionalZurdoDev22-Nov-19 9:36 
AnswerRe: SQL Server Management Studio VS SQL Server in Visual Studio 2019 Pin
Mycroft Holmes22-Nov-19 11:36
professionalMycroft Holmes22-Nov-19 11:36 
AnswerRe: SQL Server Management Studio VS SQL Server in Visual Studio 2019 Pin
Eddy Vluggen22-Nov-19 15:10
professionalEddy Vluggen22-Nov-19 15:10 
GeneralRe: SQL Server Management Studio VS SQL Server in Visual Studio 2019 Pin
Ebrahimaw25-Nov-19 16:48
Ebrahimaw25-Nov-19 16:48 
GeneralRe: SQL Server Management Studio VS SQL Server in Visual Studio 2019 Pin
Eddy Vluggen26-Nov-19 1:32
professionalEddy Vluggen26-Nov-19 1:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.