Click here to Skip to main content
15,897,371 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL Server does not exists or access denied Pin
Sushant Duggal11-Feb-07 22:57
Sushant Duggal11-Feb-07 22:57 
GeneralRe: SQL Server does not exists or access denied Pin
Pete O'Hanlon12-Feb-07 3:01
mvePete O'Hanlon12-Feb-07 3:01 
QuestionExport data from SQL server 2005 Pin
Spaz8011-Feb-07 21:16
Spaz8011-Feb-07 21:16 
QuestionCalculating the Time length Pin
minkinin11-Feb-07 20:14
minkinin11-Feb-07 20:14 
AnswerRe: Calculating the Time length Pin
Blue_Boy11-Feb-07 22:05
Blue_Boy11-Feb-07 22:05 
GeneralRe: Calculating the Time length Pin
minkinin12-Feb-07 0:09
minkinin12-Feb-07 0:09 
GeneralRe: Calculating the Time length Pin
Blue_Boy12-Feb-07 0:23
Blue_Boy12-Feb-07 0:23 
AnswerRe: Calculating the Time length Pin
gauthee11-Feb-07 22:07
gauthee11-Feb-07 22:07 
Questionless than 100 query Pin
m.rastgar11-Feb-07 19:18
m.rastgar11-Feb-07 19:18 
AnswerRe: less than 100 query Pin
Bassam Saoud11-Feb-07 19:59
Bassam Saoud11-Feb-07 19:59 
QuestionProgram can't access the server on the network >> VB.net 2005 [modified] Pin
kindman_nb11-Feb-07 10:48
kindman_nb11-Feb-07 10:48 
AnswerRe: Program can't access the server on the network >> VB.net 2005 Pin
kindman_nb11-Feb-07 21:31
kindman_nb11-Feb-07 21:31 
QuestionRe: Program can't access the server on the network >> VB.net 2005 Pin
andyharman11-Feb-07 23:43
professionalandyharman11-Feb-07 23:43 
AnswerRe: Program can't access the server on the network >> VB.net 2005 Pin
kindman_nb11-Feb-07 23:50
kindman_nb11-Feb-07 23:50 
QuestionAdvanced string manipulation - MS Access Pin
alect11-Feb-07 8:52
alect11-Feb-07 8:52 
AnswerRe: Advanced string manipulation - MS Access Pin
andyharman11-Feb-07 23:37
professionalandyharman11-Feb-07 23:37 
QuestionAssign value of one column to other Pin
TrooperIronMan11-Feb-07 7:44
TrooperIronMan11-Feb-07 7:44 
AnswerRe: Assign value of one column to other Pin
Bassam Saoud11-Feb-07 19:51
Bassam Saoud11-Feb-07 19:51 
Questionsql query analyzer Pin
Member 381773811-Feb-07 4:47
Member 381773811-Feb-07 4:47 
AnswerRe: sql query analyzer Pin
tommyligo11-Feb-07 5:27
tommyligo11-Feb-07 5:27 
AnswerRe: sql query analyzer Pin
Rob Graham11-Feb-07 5:35
Rob Graham11-Feb-07 5:35 
QuestionFilling a dataset not working Pin
Blekk10-Feb-07 14:03
Blekk10-Feb-07 14:03 
Hi,

I need a little help. I have created an untyped dataset on my form called dataSet1 and am trying to create a parent/child relationship with a datagrid displaying the data. But I am getting a weird exception on the code:

da.Fill(dataSet1);


The exception says: "Incorrect syntax near '*'"

I don't understand this exception atall.

Please help me,

Any reply is appreciated.

P.S. here is the full code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace NorthwindTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            string strConnect = @"server = (local)\SQLEXPRESS; integrated security = sspi; database = C:\SQL\NORTHWND.MDF";
            string strQuery1 = @"SELECT * FROM employees";
            string strQuery2 = @"SELECT * FROM orders";
            string strQuery = strQuery1 + strQuery2;


            SqlConnection conn = new SqlConnection(strConnect);
            SqlDataAdapter da = new SqlDataAdapter(strQuery, conn);
            da.TableMappings.Add("Table", "employees");
            da.TableMappings.Add("Table1", "orders");
            da.Fill(dataSet1);
            DataRelation relation = new DataRelation("employeeorders", dataSet1.Tables[0].Columns["employeeid"], dataSet1.Tables[1].Columns["employeeid"]);
            dataSet1.Relations.Add(relation);
            dataGridView1.DataBindings.Add("datasouce", dataSet1, "employees");
        }


    }
}

AnswerRe: Filling a dataset not working Pin
Rocky#10-Feb-07 21:02
Rocky#10-Feb-07 21:02 
GeneralRe: Filling a dataset not working Pin
Blekk11-Feb-07 2:25
Blekk11-Feb-07 2:25 
GeneralRe: Filling a dataset not working Pin
Rocky#11-Feb-07 5:22
Rocky#11-Feb-07 5:22 

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.