Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
P

Praveen 123

@Praveen 123
About
Posts
24
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Is any Record Set Concept is there in OLEDB
    P Praveen 123

    I am having a Select Query which is suppose to select multipple records from a table (MS-Access). I am using OLEDB from my connection and using OLEDB Adapter and datasets to desplay data. But I want to perform an operation on Each records after selecting from the DB- Which I want to Diaplay to the Data Grid also. But By using the OLEDB i am unable to collect the information from the records before binding. Is any way there to take the records and operate on it before binding, and using OLEDB ? Dim con As OleDbConnection Dim cmd As OleDbCommand = New OleDbCommand Dim dataSet As dataSet = Nothing Sub BindGrid() Dim oleDbDataAdapter As OleDbDataAdapter = Nothing Dim ConnectionString = System.Configuration. _ ConfigurationSettings.AppSettings(ConConstant.MS_ACCESS_CONNECTION_STRING) ' Ge the sql query Dim SelectQueryText As String = String.Empty SelectQueryText = "Select Leave_Code as LeaveCode,Leave_Name as LeaveName,NoOfDays as Days from Leave_Mstr" oleDbDataAdapter = New OleDbDataAdapter(SelectQueryText, _ New OleDbConnection(ConnectionString)) ' Create the data set dataSet = New DataSet ' Fill the data set with the data oleDbDataAdapter.Fill(dataSet) If (Not oleDbDataAdapter Is Nothing) Then oleDbDataAdapter = Nothing End If With dgLeavCrtnLeavDtls .DataSource = dataSet .DataMember = dataSet.Tables(0).TableName .DataBind() End With End Sub Sub tablebind() Dim oleDbDataAdapter As OleDbDataAdapter = Nothing Dim ConnectionString = System.Configuration. _ ConfigurationSettings.AppSettings(ConConstant.MS_ACCESS_CONNECTION_STRING) ' Ge the sql query Dim SelectQueryText As String = String.Empty SelectQueryText = "Select Leave_Code as LeaveCode,Leave_Name as LeaveName,NoOfDays as Days from Leave_Mstr" oleDbDataAdapter = New OleDbDataAdapter(SelectQueryText, _ New OleDbConnection(ConnectionString)) ' Create the data set dataSet = New DataSet ' Fill the data set with the data oleDbDataAdapter.Fill(dataSet) Dim dh As TableHeaderCell Dim dc As DataColumn Dim dr As DataRow For Each dr In dataSet.Tables(0).Rows Dim trow As New TableRow For Each dc In dataSet.Tables(0).Columns Dim tcell As New TableCell tcell.Co

    .NET (Core and Framework) database css wpf wcf question

  • Putting related Two records to one row
    P Praveen 123

    Sir, Some changes i made from u'r query ..any way u'r concept worked here,,,Thanks for u'r assistance sir This is the code i used..... SELECT h.UserName, h.EventDate, h.EventTime AS InTime, h2.EventTime AS OutTime, h.Dept FROM History AS h LEFT JOIN History AS h2 ON (h.UserName = h2.UserName) AND (h.EventDate = h2.EventDate) WHERE (((h.EventDate)=#2/24/2006#) AND ([h.FuncCode]="0") AND ([h2.FuncCode]="10") AND ((h.Dept)="Engg")); Thanks and Regards

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    Database help

  • Putting related Two records to one row
    P Praveen 123

    Sir, I tried but i am getting the error message as "At most one record can be returned by this sub query" ? This is the code thai i tried SELECT main.UserName, (SELECT i.EventTime FROM History i WHERE i.FuncCode="0") AS InTime, (SELECT o.EventTime FROM History o WHERE o.FuncCode="10") AS OutTime FROM History main Any chance of mistake in this code?

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    Database help

  • Putting related Two records to one row
    P Praveen 123

    thanks for u'r advide, But I am using only one table namedv History with following tables EmpId,EmpName,ShiftIn,ShiftOut,EventTime,LoginType From Event Time I am extracting the values based on the LoginType,,Sir u got me...That is only one table is there....(History)....One doubt regarding that u specified the main,i,o as defrent tables or not?

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    Database help

  • Putting related Two records to one row
    P Praveen 123

    Sir, U'r suggestion is not enough...because i am using onlu only table ,,,my quear gave me theattendance report like i shown above...but Can i simply make the inner join with the same table? i need the out put as follows ---------------------------------- ID |Name |InTime |OutTime| 1 |xxxxxxxxxxx| 09:05 | 06:01 2 |sdsssdddddd| 06:15 | 06:15 ----------------------------------- Like that..But at present they are displaying as i explainned in my first question.

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    Database help

  • Putting related Two records to one row
    P Praveen 123

    Hello everybody, I have a Attendance table, which has columns Date. ShiftInTime, ShiftOutTime, EventTime, Login_Type. Now for every EventCode= "I" or "O" there are two records. That means for a day say 07/10/2006 as Workdate there are two records like, EmpID Date EventTime EventCode 1 07/10/2006 9:00 I 1 07/10/2006 17:15 O NOW.. I want a report in Table or Crystal report which will have a single record for a single Workdate..as folllows EmpID WorkDate ShiftInTime ShiftOutTime InTime OutTime 1 07/10/2006 09:00 17:00 9:00 17:15 Can you please help me out..I'm usng a table in ASp

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    Database help

  • Adding additional text to Dropdown list
    P Praveen 123

    Below my DropDownList bound with a Department table.Following Output iam getting,IT,CSE,Mech-these all from table.but i want an "ALL" text also there in list box..How come this possible? Sub bindDtgrid() With dtgEmplList .DataSource = myDataSet .DataMember = myDataSet.Tables(0).TableName .DataBind() End With End Sub

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    Visual Basic question

  • How do I select time only from a DATETIME column?
    P Praveen 123

    sir, I am developing an application in ASP.NET using VB.NET.My backend tool is MS-Access.How can i select time only from a date time feild... Actually i want 09:00:15 AM/PM only...But its displaying 12/12/1987 09:00:15 AM/PM ...

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    Visual Basic question csharp asp-net

  • The Date format problem with MS-Access DB
    P Praveen 123

    Sir, Actually i dont ve the permission to change the format of EventDate in DB...Then what i should do?Is there any provision to change the format of record at rub time?

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    ASP.NET database question csharp asp-net

  • The Date format problem with MS-Access DB
    P Praveen 123

    This is the Select query that i am using while developing ASP.Net app using VB.Net My EventDate is in General Date format.But gDate is in Short Date format.So query not produsing any out put. Dim gDate As DateTime = txtDate.Text.Trim() SelectQueryText = "SELECT Distinct UserID,EventDate FROM History WHERE Dept='" + lstDept.SelectedValue.Trim() + "'AND EventDate=" + gDate + "" What is the currect query to get the OutPut?

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    ASP.NET database question csharp asp-net

  • How display data from DB by selecting from DropdownList
    P Praveen 123

    By using SQLString = "SELECT Name FROM test WHERE ID = +DropDownList1.SelectedValue" I got the selected item from dropdown list.Now how can i place the out put of the query in a DataGrid? i want the syntax or coding? :confused: -- modified at 23:32 Thursday 1st February, 2007

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    ASP.NET database help csharp asp-net

  • How display data from DB by selecting from DropdownList
    P Praveen 123

    Sir, I am developing an application in ASP.NET.It's using a MS-Access database and I am listing ten Emp_IDs from the table Employee to DropdownList.I want to select particular Emp_Name from Employee table on click on DropdownList. Pleas help me to solve this problem.

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    ASP.NET database help csharp asp-net

  • How display data from DB by selecting from DropdownList
    P Praveen 123

    Sir, I am developing an application in ASP.NET.It's using a MS-Access database and I am listing ten Emp_IDs from the table Employee to DropdownList.I want to select particular Emp_Name from Employee table on click on DropdownList. Pleas help me to solve this problem.

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    Visual Basic database help csharp asp-net

  • How to bring the Ms-Access DB record to a DropdownList?
    P Praveen 123

    yes, Its working sir.the problem was with my database...The problem was when i am working with a database in a user permission account i cant access the DB.When i changed the location of the DB to some other system directory, it works.Any way thanks for u'r asistance. Regards

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    ASP.NET help database tutorial question

  • How to bring the Ms-Access DB record to a DropdownList?
    P Praveen 123

    sir after the specified modification the following line of error is appearing. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source of error::: ----------------------------------- DBConnection.Open() Line 39: DBCommand = New OleDb.OleDbCommand("SELECT Employee_ID FROM Attendance_Details", DBConnection) Error line:-Line 40: OleDbDataAdapter1.SelectCommand = DBCommand Line 41: DataSet1 = New DataSet Line 42: OleDbDataAdapter1.Fill(DataSet1, "Attendance_Details") -- modified at 23:39 Wednesday 31st January, 2007

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    ASP.NET help database tutorial question

  • How to bring a database record to DropdownList in asp .net app?
    P Praveen 123

    sir, What the "name" and "id" reprecents....Because both are bringing to the same dropdown list..

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    ASP.NET csharp asp-net database tutorial question

  • How to bring the Ms-Access DB record to a DropdownList?
    P Praveen 123

    the following code is for connecting a DropdownList with a Ms-access record but its not working.....Pleas help me Dim DBConnection As System.Data.OleDb.OleDbConnection Dim DBCommand As System.Data.OleDb.OleDbCommand Dim DBReader As System.Data.OleDb.OleDbDataReader Dim SQLString As String Dim DataSet1 As System.Data.DataSet If Not Page.IsPostBack Then DBConnection = New System.Data.OleDb.OleDbConnection( _ "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\Documents and Settings\All Users\Documents\Attendance\BTA_ DB_Design\BTAS.mdb") DBConnection.Open() DBCommand = New OleDb.OleDbCommand("SELECT Employee_ID FROM Attendance_Details", DBConnection) OleDbDataAdapter1.SelectCommand = DBCommand OleDbDataAdapter1.Fill(DataSet1, "Attendance_Details") DropDownList1.DataSource = DataSet1.Tables("Attendance_Details") DropDownList1.DataValueField = "Employee_ID" DropDownList1.DataBind() DBReader.Close() DBConnection.Close() Error:-Value cannot be null. Parameter name: dataSet

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    ASP.NET help database tutorial question

  • How to bring a database record to DropdownList in asp .net app?
    P Praveen 123

    Sir that attaching code i am asking,My data base is attached to the page using oledb connection.Now on loading the page i want to display the data base records on the DropdownList

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    ASP.NET csharp asp-net database tutorial question

  • How to bring a database record to DropdownList in asp .net app?
    P Praveen 123

    Hi, I am doing a asp.net app.My backend is MS-Access.Plaes send me the code to bring a access data base record to the DropdownList. Eg:To list all employee_names in a table to DropownList.

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    ASP.NET csharp asp-net database tutorial question

  • Running Error on ASP.NET
    P Praveen 123

    how can i run the site from localhost?,one more error appearing"Integrated windows authentication not enabled" -- modified at 4:23 Tuesday 23rd January, 2007

    Praveen.K System Engineer Graviton Technologies Pvt.Ltd

    ASP.NET csharp asp-net visual-studio debugging help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups