Click here to Skip to main content
15,867,453 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming25-Sep-17 1:53
mveRichard Deeming25-Sep-17 1:53 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex25-Sep-17 3:22
samflex25-Sep-17 3:22 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming25-Sep-17 3:51
mveRichard Deeming25-Sep-17 3:51 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex25-Sep-17 4:20
samflex25-Sep-17 4:20 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming25-Sep-17 4:30
mveRichard Deeming25-Sep-17 4:30 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex25-Sep-17 6:32
samflex25-Sep-17 6:32 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming25-Sep-17 6:36
mveRichard Deeming25-Sep-17 6:36 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex25-Sep-17 8:23
samflex25-Sep-17 8:23 
I know you have been very patient with me and you have given me more than I asked for (Thank you) but can you please look at the below code for me?

The problem I believe, is that when I enter an account number, it is not populating the form.

Could you please see if there is something to change with the code below?

TER PROCEDURE [dbo].[sp_AllRecs]
@pin int
AS
BEGIN
SET NOCOUNT ON;

SELECT ROW_Number() OVER (ORDER BY(SELECT 0)) RowNumber, mp.[DateSold] as datesold
      ,mp.[SalePrice] as salePrice
      ,mp.[Description] as Description
      ,mp.[BuyerFullName] as buyername
      ,mp.[BuyerAddress] as buyeraddress
      ,mp.[BuyerCity] as buyercity
      ,mp.[BuyerState] as buyerstate
      ,mp.[BuyerZipCode] as buyerzip
      ,mp.[mDateSold] as mdatesold
      ,mp.[mSalePrice] as msalePrice
      ,mp.[mDescription] as mDescription
      ,mp.[mBuyerFullName] as mbuyername
      ,mp.[mBuyerAddress] as mbuyeraddress
      ,mp.[mBuyerCity] as mbuyercity
      ,mp.[mBuyerState] as mbuyerstate
      ,mp.[mBuyerZipCode] as mbuyerzip
      ,mp.[PreviousOwnerName] as PrevOnwerName
      ,mp.[PreviousOwnerAddress] as prevAddr
      ,mp.[PreviousOwnerCity] as prevCity
      ,mp.[PreviousOwnerState] as PrevState
      ,mp.[PreviousOwnerZipCode] as prevzip
      ,mp.[mPreviousOwnerName] as mprevOnwerName
      ,mp.[mPreviousOwnerAddress] as mprevAddr
      ,mp.[mPreviousOwnerCity] as mprevCity
      ,mp.[mPreviousOwnerState] as mPrevState
      ,mp.[mPreviousOwnerZipCode] as mprevzip
      ,mp.[signDate]
      ,mp.[sTitle]
	  ,ms.County As boatcnty
      ,ms.Registration_No As aRegNo
      ,ms.Motor_MFG_Make AS aMake
      ,ms.Boat_MFG_Make as mMake
      ,ms.Motor_MFG_Model as ModelNoA
      ,ms.Boat_MFG_Model as ModelNoM
      ,ms.Boat_Year_Built as boatYrBuilt
      ,ms.Motor_Year_Built as motorYrBuilt
      ,ms.[Length] as blength
      ,ms.HullMaterial as hullmaterial
      ,ms.HorsePower as mhorsepower
      ,ISNULL(ms.HorsePowerType,'NA') as rdlmhorsepType
      ,ms.Boat_DatePurchased as datePurchased
      ,ms.Motor_DatePurchased as mdatePurchased
      ,ISNULL(ms.Boat_PurchaseType,'NA') as PurchaseType
      ,ms.Motor_PurchaseType as rblmPurchasedType
      ,ms.MotorCost as motorCost
      ,ms.BoatCost as boatCost
      ,ms.FileDate
      ,ms.boatIssues as rblIssues
      ,ms.motorIssues as mrblIssues
      ,ms.boatIssuesDetails as functionalIsses
      ,ms.motorIssuesDetails as mfunctionalIsses
	  ,mf.TypeOfVessel as vesseltypeUse
      ,mf.VesselName as vesselname
      ,mf.HorspwrTypOfEngine as vesselhorsepEngine
      ,mf.CoastGuardNo AS coastGuardNumber
      ,mf.YearPurchased as VesselYrPurchased
      ,mf.PurchaseType as PurchasedNew
      ,mf.AmtOfPurchase as VesselPurchaseAmt
      ,mf.HomePort as homePort
      ,mf.WhereDocked as whereDocked
      ,mf.Boat_Motor_Accsry_Equip as bmequipAccessoryList
      ,mf.vesselLength as vessellength
      ,mf.YrVesselBuilt as vesselYrBult
      ,mf.VHullMaterial as VesselHullMateria
  FROM MarineInfo m 
  INNER JOIN BoatMarincePurchaserInfo mp ON m.pid = mp.pid
  INNER JOIN MarineScheduleD ms ON m.pid = ms.pid
  INNER JOIN MarineFedVesselInfo mf ON m.pid = mf.pid
  WHERE m.pid = @pin
 END

C#
    private void getRecs(int pin)
    {
        SqlConnection conn = new SqlConnection(connStr);
        SqlCommand cmd = new SqlCommand("sp_AllRecs", conn);
        cmd.CommandType = CommandType.StoredProcedure;
        SqlParameter p1 = new SqlParameter("@pin", pin);
        cmd.Parameters.Add(p1);
        SqlDataAdapter sda = new SqlDataAdapter(cmd);
        DataTable dtPrevRecords = new DataTable();
        sda.Fill(dtPrevRecords);
        if (dtPrevRecords.Rows.Count > 0)
        {
            Repeater2.DataSource = dtPrevRecords;
            Repeater2.DataBind();
            ViewState["CurrentTable"] = dtPrevRecords;
        }
    }
    
    pageLoad() event
    
    if (!Page.IsPostBack)
    {
    
     this.getRecs(pid);
   }

GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming25-Sep-17 10:43
mveRichard Deeming25-Sep-17 10:43 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex25-Sep-17 10:58
samflex25-Sep-17 10:58 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex26-Sep-17 6:56
samflex26-Sep-17 6:56 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming26-Sep-17 7:21
mveRichard Deeming26-Sep-17 7:21 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? (SOLVED) Pin
samflex26-Sep-17 7:59
samflex26-Sep-17 7:59 
GeneralRe: Repeater2 is not getting populated with data from Repeater2. Any ideas? Pin
Richard Deeming26-Sep-17 8:05
mveRichard Deeming26-Sep-17 8:05 
QuestionMy service move my file Location but doesn't upload the data in sql server... here is my code Pin
Member 1286345320-Sep-17 1:26
professionalMember 1286345320-Sep-17 1:26 
AnswerRe: My service move my file Location but doesn't upload the data in sql server... here is my code Pin
Nathan Minier20-Sep-17 1:43
professionalNathan Minier20-Sep-17 1:43 
GeneralRe: My service move my file Location but doesn't upload the data in sql server... here is my code Pin
Member 1286345320-Sep-17 18:58
professionalMember 1286345320-Sep-17 18:58 
GeneralRe: My service move my file Location but doesn't upload the data in sql server... here is my code Pin
Nathan Minier21-Sep-17 1:43
professionalNathan Minier21-Sep-17 1:43 
GeneralRe: My service move my file Location but doesn't upload the data in sql server... here is my code Pin
Member 1286345322-Sep-17 23:44
professionalMember 1286345322-Sep-17 23:44 
AnswerRe: My service move my file Location but doesn't upload the data in sql server... here is my code Pin
Richard MacCutchan20-Sep-17 21:38
mveRichard MacCutchan20-Sep-17 21:38 
GeneralRe: My service move my file Location but doesn't upload the data in sql server... here is my code Pin
Member 1286345320-Sep-17 21:52
professionalMember 1286345320-Sep-17 21:52 
GeneralRe: My service move my file Location but doesn't upload the data in sql server... here is my code Pin
Richard MacCutchan20-Sep-17 22:16
mveRichard MacCutchan20-Sep-17 22:16 
GeneralRe: My service move my file Location but doesn't upload the data in sql server... here is my code Pin
Member 1286345320-Sep-17 22:33
professionalMember 1286345320-Sep-17 22:33 
GeneralRe: My service move my file Location but doesn't upload the data in sql server... here is my code Pin
Richard MacCutchan20-Sep-17 22:53
mveRichard MacCutchan20-Sep-17 22:53 
GeneralRe: My service move my file Location but doesn't upload the data in sql server... here is my code Pin
Member 1286345320-Sep-17 22:56
professionalMember 1286345320-Sep-17 22:56 

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.