16,012,110 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Yogi ,Pune (Top 36 by date)
Yogi ,Pune
24-Dec-13 1:58am
View
I have also tried it,i.e instead of * putting column names still same error persist.
Yogi ,Pune
24-Dec-13 1:50am
View
I used Select * in my query.
Yogi ,Pune
24-Dec-13 1:44am
View
it is not that i don't know, I was already tried below mentioned query
Select * From Student_Master Inner Join Book_Master On Student_Master.SID=Book_Master.SID Inner Join Author_Master On Book_Master.BID=Author_Master.BID Where Book_Master.BPRICE>1000 Group By Author_Master.BID Having COUNT(Author_Master.BID)>1
for above query system throws an error:"Column 'Student_Master.SID' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause."
Main Question:
Write query which give list of student who take books who's price is >1000 & Book having more than one Author.
Tables:
Student: SID,SNMAE
Book: BID,BNAME,BPRICE,SID
Author: AID,ANAME,BID
I have also tried query given by you but system showing blank result but there is records in database , having more than one author to books
Yogi ,Pune
24-Dec-13 0:01am
View
Can u tell me query who retrieve list of books having more than one author.
If i get this query i will try it in join query.
Yogi ,Pune
23-Dec-13 23:54pm
View
I have tried your code " If (e.RowIndex > 0) Then"
when I debug this code, i found that RowIndex=0. i.e in code we checked 0 > 0 hence condition is not fulfill, so system is not executing any statement
then I tried (e.RowIndex >= 0) then again same error occurred.There is no row at position 0
Yogi ,Pune
23-Dec-13 4:55am
View
I am facing problem how to write statement which give book having multiple author
Yogi ,Pune
23-Dec-13 4:54am
View
Where Book_Master.BPRICE>1000
Group By Author_Master.BID
Having COUNT(Author_Master.BID)>1
Yogi ,Pune
23-Dec-13 2:45am
View
Yes
Yogi ,Pune
21-Dec-13 4:46am
View
Thanks
Yogi ,Pune
21-Dec-13 4:23am
View
Still I am not clear, what are you trying to say. Can you show me example in my code?
Yogi ,Pune
20-Dec-13 3:56am
View
When I write below mentioned code
Select * From Student_Master
Inner Join Book_Master
On Student_Master.SID=Book_Master.SID
Inner Join Author_Master
On Book_Master.BID=Author_Master.BID
Where Book_Master.BPRICE>1000
Group By Author_Master.BID
Having COUNT(Author_Master.BID)>1
SQL throws en error :
Msg 8120, Level 16, State 1, Line 1
Column 'Student_Master.SID' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Tables:
Student: SID,SNMAE
Book: BID,BNAME,BPRICE,SID
Author: AID,ANAME,BID
As I mentioned above I want to write query which give list of student who take books who's price is >1000 & Book having more than one Author.
Yogi ,Pune
17-Dec-13 23:59pm
View
Yes I used Primary key & Foreign key concept.
Yogi ,Pune
28-Nov-13 4:39am
View
Imports System
Imports System.Data
Imports System.Data.OleDb
Imports System.Collections
Dim con As New OleDbConnection
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Data\HR.accdb;"
con.Open()
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim cmd As New OleDbCommand
Dim rd As OleDbDataReader
Dim str As String
cmd.Connection = con
cmd.CommandText = "Select Max(SRN) from Employee"
rd = cmd.ExecuteReader(CommandBehavior.CloseConnection)
If (rd.HasRows = False) Then
txtSRN.Text = 1
Else
rd.Read()
Str = Convert.ToInt32(rd(0))
str = str + 1
txtSRN.Text = str
End If
End Sub
Yogi ,Pune
28-Nov-13 4:02am
View
Is their is any setting to get db_owner permission?
Yogi ,Pune
28-Nov-13 3:00am
View
now system gives error to "If (rd(0) <> DBNull.Value) Then" statement
Operator '<>' is not defined for types 'Object' and 'System.DBNull'
Yogi ,Pune
28-Nov-13 1:05am
View
Still system throws an error Object cannot be cast from DBNull to other types.
for "str = Convert.ToInt32(rd(0))" statement
Yogi ,Pune
28-Nov-13 0:30am
View
then what should be the code for the same? Please give me.
Yogi ,Pune
27-Nov-13 10:08am
View
Thanks
but what about first issue
1. If (rd.HasRows) Then
for this statement every time system return "TRUE" whereas there is no value in Employee Table
As per the logic when there is no value in table system should execute code return in "Else" part.
Yogi ,Pune
10-Jan-13 9:39am
View
Thanks for suggestion.
Now I want to show Item Type also with Item description.
As per selection of cmbPartNo combo box Item Type & Item Description should be display in respective text boxes.
Yogi ,Pune
9-Jan-13 9:31am
View
No . Part_No is varchar
Yogi ,Pune
9-Jan-13 9:30am
View
Yes I did it in Com box selectedindexchanged event
Yogi ,Pune
4-Jan-13 23:48pm
View
"Where ever your reference to 'dt' is! This table is expecting certain column types. You need to make sure the same is passed."
Please explain your statement in detail.I am unable to understand "reference to 'dt'". As per my code & tables i mentioned above can you give me which is reference table in my code.
Thank you
Yogi ,Pune
4-Jan-13 23:30pm
View
Yes I understand there is data type mismatch error, but in which table i have to check table design "ItemMaster or Invoice"
My doubt is still same "dr = dt.NewRow()" through this statement in which table system create new row.
If you look at my code. I am creating new row & inserting value into it not in my actual tables/database,that's why i am confused how to resolved this error.
Are you want to see my database structure.
Yogi ,Pune
2-Jan-13 5:31am
View
I understand there is problem of string & int value storage, but exactly where?
I am not storing a data into database. I stored it into datatable.
I checked datatable sequence it is all right.
Yogi ,Pune
29-Dec-12 2:06am
View
Thanks
Yogi ,Pune
23-Dec-12 11:10am
View
Thanks
Yogi ,Pune
11-Dec-12 8:09am
View
As per your suggestion I made changes,remove single quotes & drop To string from cmbItemName.Selected value.Now system showing following error.
No mapping exists from object type System.Data.DataRowView to a known managed provider native type.
at the time of debugging the code I noticed one thing, after command.Parameters.AddWithValue("@selectedItemNo", cmbItemName.SelectedValue) statement
cursor go to "Try" statement & then "rd = command.ExecuteReader" statement.
which is correct but when cursor go to "rd = command.ExecuteReader" statement system also highlighting catch block.i.e something is wrong in between
command.Parameters.AddWithValue("@selectedItemNo", cmbItemName.SelectedValue)
rd = command.ExecuteReader this two statement
Yogi ,Pune
7-Dec-12 12:15pm
View
I made changes in my code as per your suggestion & debug the code I found that after command.Parameters.AddWithValue("@selectedItemNo", cmbItemName.SelectedValue.ToString()) this statement in my code cursor go to rd = command.ExecuteReader &
If rd.Read = True Then statement after that cursor directly go to Catch statement & shows same error again even "If rd.Read = True Then" at this statement code return True value i.e True=True.
Is there is any thing missing in my code.
Yogi ,Pune
7-Dec-12 10:36am
View
As per your suggestion when I removed .To string()system throws following error after "rd = command.ExecuteReader" statement.
No mapping exists from object type System.Data.DataRowView to a known managed provider native type.
Yogi ,Pune
7-Dec-12 10:12am
View
Yes. Item_no is a integrer
Yogi ,Pune
6-Dec-12 9:34am
View
Thanks for suggestion.
but now I am getting another error : "FindControl" is not a member of system.Windows.Forms.DataGridView.Row.
Why you use lblAmount 2nd time after breaket closed.Is it label or variable.
Yogi ,Pune
6-Dec-12 8:10am
View
Yes issue is still there.
Please suggest me a solution
Yogi ,Pune
5-Dec-12 11:00am
View
on rd = command.ExecuteReader statement system directly go to catch statement & show message "The connection was not closed. The connection's current state is open.".
above mentioned issue still exist.
Yogi ,Pune
5-Dec-12 10:32am
View
Please suggest solution for my question
Yogi ,Pune
4-Dec-12 23:02pm
View
Please provide code for the same.
Yogi ,Pune
3-Dec-12 12:31pm
View
Thanks
Show More