Jump to content
Xtreme .Net Talk

alpineguy

Members
  • Posts

    10
  • Joined

  • Last visited

Personal Information

  • Occupation
    Software developer
  • Visual Studio .NET Version
    Visual Studio .NET Enterprise Architect
  • .NET Preferred Language
    C#

alpineguy's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Make sure that when you fill the dataset that you reference the table names, otherwise it will think those two DataAdapters are the same table: oleDbDataAdapterTournament.Fill(dsTournament1); oleDbDataAdapterGroup.Fill(dsTournament1); Should probably look like: oleDbDataAdapterTournament.Fill(dsTournament1, "Tournament"); oleDbDataAdapterGroup.Fill(dsTournament1, "Group"); /cc (edit: typos)
  2. I'm thinking in C#, blah. I'd still try replacing: m_odcJob.Parameters.Add("@contractid", m_ContractID) With: m_odcJob.Parameters.Add("@contractid", OdbcType.Int).Value = m_ContractID That is, if ContractID is an integer.
  3. I'm pretty sure int itself is not an object. Int32, however, is.
  4. Ah! Here's something: m_odcJob.Parameters.Add("@contractid", m_ContractID) m_odcJob.Parameters.Add("@active", -1) The .Add() method is crazy-overloaded, and I think the arguments you want to give it are .Add( String, Object ); In the second example, you pass to it '-1', which is a base type and not an object. I can only assume that the ContractID will also be a number, so make sure you turn that into an object first, as well. So, this turns into (assuming m_ContractID is an int): m_odcJob.Parameters.Add("@contractid", Convert.ToInt32(m_ContractID) ); m_odcJob.Parameters.Add("@active", Convert.ToInt32(-1) );
  5. Weird, I saw it in a lot of .NET Documentation earlier today. I figure if Microsoft uses it, it should be valid, right? :P (edit: Maybe enumerate? *snicker* That would be messy.)
  6. You might want to chack out how to make odbcparameters at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdataodbcodbcparameterclasstopic.asp In VB, I think the "?" syntax is correct.
  7. Nevermind, found it. :) Hmm... *research*
  8. Where are you setting the value of @contractid ?
  9. *sigh* It wasn't the blank data at all. In the Crystal Reports tutorial on ADO.NET, they never put the table names in the DataAdapters. This is problematic if you are only giving one DataSet to the report with multiple tables: DataAdapter summaryDA = new DataAdapter( "exec blah.dbo 1", myConnection ); DataAdapter xutilDA = new DataAdapter( "exec blahxutil.dbo 1", myConnection ); DataSet myDataSet = new DataSet(); // Then you fill, but REMEMBER TO SPECIFY TABLE NAME summaryDA.Fill( myDataSet, "MCSSummary" ); xutilDA.Fill( myDataSet, "MCSSummaryXUtil" ); Then all is well. :)
  10. I've gotten my report to do its thing with an ADO.NET DataSet, however... I have a stored procedure that may or may not come back with data to fill the DataSet. If it doesn't come back with data, it breaks the schema and the report won't run. Is there any way to dynamically see if there's data coming back and just fill in a blank element? Or, maybe I should ask if there's an elegant way. Any help is appreciated. /cc
×
×
  • Create New...