Click here to Skip to main content
15,909,652 members
Home / Discussions / Database
   

Database

 
Questionsql reporting services connection error Pin
TintinV3ck27-Jul-06 2:42
TintinV3ck27-Jul-06 2:42 
QuestionCode to find sql server vulnerabilties Pin
sfernandes27-Jul-06 0:57
sfernandes27-Jul-06 0:57 
AnswerRe: Code to find sql server vulnerabilties Pin
LongRange.Shooter27-Jul-06 3:58
LongRange.Shooter27-Jul-06 3:58 
QuestionAsking user for Database name Pin
Thanat0s426-Jul-06 18:35
Thanat0s426-Jul-06 18:35 
AnswerRe: Asking user for Database name Pin
Colin Angus Mackay27-Jul-06 2:18
Colin Angus Mackay27-Jul-06 2:18 
QuestionSQL Server, Performance and Implementation Pin
clint198226-Jul-06 11:10
clint198226-Jul-06 11:10 
AnswerRe: SQL Server, Performance and Implementation Pin
Mike Dimmick27-Jul-06 1:02
Mike Dimmick27-Jul-06 1:02 
QuestionSP returns multiple results, can't get them all into datatables Pin
eappell26-Jul-06 5:11
eappell26-Jul-06 5:11 
I've got a stored procedure that calls other stored procedures so that I end up with 8 sets of results when it is run. I'm trying to figure out how to get all 8 of those result sets into one dataset, and 8 seperate datatables within the dataset. I've got code that does run the sp and I'm attempting to put the results into seperate tables in the dataset, but I end up with the same results in all 8 datatables. Here's my code (just trying to get first four results here to test):

The code from my data class:

  public static DataSet getDataSet(string xref)<br />
  {<br />
    SqlConnection con = new SqlConnection(getConnectionString());<br />
<br />
    try<br />
    {<br />
      SqlCommand kpfCmd = new SqlCommand(kpfSP, con);<br />
      kpfCmd.CommandType = CommandType.StoredProcedure;<br />
<br />
      // send input parameters to the stored procedure<br />
      SqlParameter paramXREF = kpfCmd.Parameters.Add("@XREF", SqlDbType.Int);<br />
      paramXREF.Direction = ParameterDirection.Input;<br />
      paramXREF.Value = xref;<br />
<br />
      SqlParameter paramIP = kpfCmd.Parameters.Add("@ADDR", SqlDbType.VarChar);<br />
      paramIP.Direction = ParameterDirection.Input;<br />
      paramIP.Value = null;<br />
<br />
      SqlParameter paramNetname = kpfCmd.Parameters.Add("@NetName", SqlDbType.VarChar);<br />
      paramNetname.Direction = ParameterDirection.Input;<br />
      paramNetname.Value = "eappell";<br />
<br />
      SqlDataAdapter ad = new SqlDataAdapter(kpfCmd);<br />
      DataSet ds = new DataSet();<br />
<br />
      ad.Fill(ds, "Auth");<br />
      ad.Fill(ds, "Results2");<br />
      ad.Fill(ds, "Results3");<br />
      ad.Fill(ds, "Results4");<br />
      return ds;<br />
    }<br />
    finally<br />
    {<br />
      con.Close();<br />
    }<br />
  }<br />


Here's my code-behind for the page:

  protected void Page_Load(object sender, EventArgs e)<br />
  {<br />
    DataSet ds = KPFData.getDataSet("602");<br />
    GridView1.DataSource = ds.Tables["Results2"];<br />
    GridView1.DataBind();<br />
<br />
    GridView2.DataSource = ds.Tables["Results3"];<br />
    GridView2.DataBind();<br />
<br />
    GridView3.DataSource = ds.Tables["Results4"];<br />
    GridView3.DataBind();<br />
  }<br />


I've been working on this for a few days, and have posted messages on a couple other message boards but no one seems to know the answer to this one. I'm really hoping code project users are the key... Please help!

Thanks,

eddie


AnswerRe: SP returns multiple results, can't get them all into datatables Pin
Rob Graham26-Jul-06 7:19
Rob Graham26-Jul-06 7:19 
QuestionHow : automatted .rdl uploaded Pin
karthic_mohan26-Jul-06 2:27
karthic_mohan26-Jul-06 2:27 
QuestionSqlServer evaluation period expired Pin
lehya26-Jul-06 2:22
lehya26-Jul-06 2:22 
AnswerRe: SqlServer evaluation period expired Pin
Rob Graham26-Jul-06 2:49
Rob Graham26-Jul-06 2:49 
AnswerRe: SqlServer evaluation period expired Pin
Jerry Hammond26-Jul-06 5:02
Jerry Hammond26-Jul-06 5:02 
QuestionTrigger on update as insert data in table ..... [modified] Pin
DineshSharma25-Jul-06 23:25
DineshSharma25-Jul-06 23:25 
AnswerRe: Trigger on update as insert data in table ..... Pin
Duncan Edwards Jones25-Jul-06 23:39
professionalDuncan Edwards Jones25-Jul-06 23:39 
QuestionBasic SQL knowledge Pin
divyaswati25-Jul-06 19:33
divyaswati25-Jul-06 19:33 
AnswerRe: Basic SQL knowledge Pin
Reza Raad25-Jul-06 19:40
Reza Raad25-Jul-06 19:40 
AnswerRe: Basic SQL knowledge Pin
Paul Conrad26-Jul-06 7:29
professionalPaul Conrad26-Jul-06 7:29 
AnswerRe: Basic SQL knowledge Pin
Ennis Ray Lynch, Jr.26-Jul-06 12:01
Ennis Ray Lynch, Jr.26-Jul-06 12:01 
AnswerRe: Basic SQL knowledge Pin
Sebastien Lachance27-Jul-06 4:19
Sebastien Lachance27-Jul-06 4:19 
QuestionOnline SQL Class? Pin
Nancy K25-Jul-06 17:54
Nancy K25-Jul-06 17:54 
AnswerRe: Online SQL Class? Pin
Jim Conigliaro26-Jul-06 1:58
Jim Conigliaro26-Jul-06 1:58 
AnswerPut MySQL on your machine Pin
Ennis Ray Lynch, Jr.26-Jul-06 4:37
Ennis Ray Lynch, Jr.26-Jul-06 4:37 
QuestionLost in a sea of encryption, Keys, and certificates Pin
Nick The Newbie25-Jul-06 12:01
Nick The Newbie25-Jul-06 12:01 
QuestionRe: Lost in a sea of encryption, Keys, and certificates [modified] Pin
Nick The Newbie26-Jul-06 5:05
Nick The Newbie26-Jul-06 5:05 

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.