Click here to Skip to main content
15,917,473 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: HRESULT in VB.NET Pin
Dave Kreskowiak11-Oct-04 4:41
mveDave Kreskowiak11-Oct-04 4:41 
GeneralRe: HRESULT in VB.NET Pin
randynamics11-Oct-04 15:52
randynamics11-Oct-04 15:52 
GeneralHi!!!Patient programmers plz help Pin
mashoto7-Oct-04 22:57
mashoto7-Oct-04 22:57 
GeneralRe: Hi!!!Patient programmers plz help Pin
Dave Kreskowiak8-Oct-04 3:32
mveDave Kreskowiak8-Oct-04 3:32 
GeneralRe: Hi!!!Patient programmers plz help Pin
Mekong River8-Oct-04 4:32
Mekong River8-Oct-04 4:32 
GeneralI need help from a VB genius Pin
afrodave7-Oct-04 20:57
afrodave7-Oct-04 20:57 
GeneralRe: I need help from a VB genius Pin
Dave Kreskowiak8-Oct-04 3:36
mveDave Kreskowiak8-Oct-04 3:36 
GeneralNavigating to another list in a DataList Pin
mcupryk7-Oct-04 20:43
mcupryk7-Oct-04 20:43 
How to do I navigate to another list in a DataList. I only want one record perpage. I have been searching
for an answer and I have come up with nothing. If anyone has any ideas please share them with me. I would
so apprecitate it.




using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Microsoft.Data.Odbc;
using System.Text;

namespace MSPOS
{
///
/// Summary description for Objects.
///

public class Objects : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DataList myDataGrid;
protected System.Web.UI.HtmlControls.HtmlForm Form1;
private DataSet ddlDataSet1 = new DataSet();
private DataSet ddlDataSet = new DataSet();
protected Int32 _currentPageNumber = 1;
protected int PageSize = 1;
public void Page_Load ( Object sender, EventArgs e )
{
if ( !Page.IsPostBack )
{
BindData();
}
}

public void BindData()
{
OdbcConnection myConnection = new
OdbcConnection("DSN=POS;UID=system;PWD=system");
myConnection.Open();

// get records from the table
string commandString = @"SELECT CM_REF, CM_DESCRIPTION,
CM_OBJECTNAME, CM_TIMEOUT, CM_TYPE, CM_CONTENT, CM_PREPARED, CM_CONNECTION FROM
TBCOMMANDS";
// Set the datagrid's datasource to the datareader and databind
// Create a OdbcCommand object and assign the connection connect to
the database
// Create a OdbcCommand object and assign the connection connect to
the database
OdbcCommand command = myConnection.CreateCommand( );
command.CommandText = commandString;
command.Connection = myConnection;
// Create the Reader and bind it to the datagrid
OdbcDataReader reader =
command.ExecuteReader(CommandBehavior.CloseConnection);
ddlDataSet.DataSource=reader;
ddlDataSet.DataBind();
reader.Close();
reader=null;
myConnection.Dispose();



}

private void InitializeComponent()
{
this.myDataGrid.SelectedIndexChanged += new
System.EventHandler(this.myDataGrid_SelectedIndexChanged);

}

private void MyDataGrid_SelectedIndexChanged(object sender,
System.EventArgs e)
{

}

private void myDataGrid_SelectedIndexChanged(object sender,
System.EventArgs e)
{

}
}
}




Thank You for Your Time,

Matt
GeneralRe: Navigating to another list in a DataList Pin
Dave Kreskowiak8-Oct-04 3:26
mveDave Kreskowiak8-Oct-04 3:26 
GeneralWeb Access Failed Error Pin
Hadi Fakhreddine7-Oct-04 20:43
Hadi Fakhreddine7-Oct-04 20:43 
GeneralRe: Web Access Failed Error Pin
Syed Abdul Khader8-Oct-04 1:08
Syed Abdul Khader8-Oct-04 1:08 
GeneralControling the Number of Records On A DataGrid Page Pin
mcupryk7-Oct-04 14:09
mcupryk7-Oct-04 14:09 
GeneralRe: Controling the Number of Records On A DataGrid Page Pin
Gavin Jeffrey7-Oct-04 22:55
Gavin Jeffrey7-Oct-04 22:55 
GeneralRe: Controling the Number of Records On A DataGrid Page Pin
macsgirl8-Oct-04 1:59
macsgirl8-Oct-04 1:59 
GeneralBind the records from the table to a datalist control in c# Pin
mcupryk7-Oct-04 12:49
mcupryk7-Oct-04 12:49 
GeneralRe: Bind the records from the table to a datalist control in c# Pin
Dave Kreskowiak8-Oct-04 3:23
mveDave Kreskowiak8-Oct-04 3:23 
GeneralDo Loop problem with MSAgent Pin
Member 8605507-Oct-04 12:34
Member 8605507-Oct-04 12:34 
GeneralRe: Do Loop problem with MSAgent Pin
Dave Kreskowiak8-Oct-04 3:17
mveDave Kreskowiak8-Oct-04 3:17 
GeneralRe: Do Loop problem with MSAgent Pin
Member 8605508-Oct-04 4:48
Member 8605508-Oct-04 4:48 
GeneralRe: Do Loop problem with MSAgent Pin
Dave Kreskowiak8-Oct-04 7:15
mveDave Kreskowiak8-Oct-04 7:15 
GeneralRe: Do Loop problem with MSAgent Pin
Member 86055011-Oct-04 6:21
Member 86055011-Oct-04 6:21 
GeneralRe: Do Loop problem with MSAgent Pin
Dave Kreskowiak11-Oct-04 7:47
mveDave Kreskowiak11-Oct-04 7:47 
GeneralRe: Do Loop problem with MSAgent Pin
Member 86055011-Oct-04 8:15
Member 86055011-Oct-04 8:15 
GeneralRe: Do Loop problem with MSAgent Pin
Dave Kreskowiak11-Oct-04 15:21
mveDave Kreskowiak11-Oct-04 15:21 
GeneralPrintPrivew Problem in MDI Form Pin
szaidi7-Oct-04 12:06
szaidi7-Oct-04 12:06 

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.