Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
public void Autostid()
{
DBaccess c = new DBaccess();
c.connect();
var result = c.Autonumber("stid", "tblstudent", "");
c.disconnect();
}

What I have tried:

public void Autostid()
{
DBaccess c = new DBaccess();
c.connect();
var result = c.Autonumber("stid", "tblstudent", "");
c.disconnect();
}
Posted
Updated 28-Dec-17 2:17am
Comments
[no name] 28-Dec-17 6:41am    
it's about your fifth post, tagged as "Group". Take care what tag you choose, it will help us to help you.
ZurdoDev 28-Dec-17 14:18pm    
Take the time to learn the basics. Also, tag your posts with something relevant.

1 solution

You are asking a lot of the same question: please start to think about your code instead of just going "I'll post it here and they will fix it for me" - you will learn a lot more, and be able to fix trivial problems like these quicker by yourself than we will!

This is the same problem you have here: Error:operator '>' cannot be applied to operands of type 'void' and 'int'[^] Different method, same problem.
And the same solution! Autonumber returns a void, not a valid result.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900