UrbanPro
true
Sumit Shaw Microsoft Excel trainer in Noida

Sumit Shaw

Senior Business Analyst

Sector 15, Noida, India - 201301.

Verified 2 Students

Referral Discount: Get ₹ 500 off when you make a payment to start classes. Get started by Booking a Demo.

Details verified of Sumit Shaw

Identity

Education

Know how UrbanPro verifies Tutor details

Identity is verified based on matching the details uploaded by the Tutor with government databases.

Overview

Having 2 years of strong experience in Healthcare Analytics.

Languages Spoken

English

Bengali

Hindi Mother Tongue (Native)

Education

Indian Institute of Engineering Science & Technology 2015

Bachelor of Engineering (B.E.)

Address

Sector 15, Noida, India - 201301

Verified Info

ID Verified

Education Verified

Phone Verified

Email Verified

Facebook Verified

Report this Profile

Is this listing inaccurate or duplicate? Any other problem?

Please tell us about the problem and we will fix it.

Please describe the problem that you see in this page.

Type the letters as shown below *

Please enter the letters as show below

Teaches

Microsoft Excel Training classes

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Microsoft Excel Training classes

2

Teaches following Excel features

Excel Macro Training, Advanced Excel, Basic Excel

C Language Classes

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in C Language Classes

2

Tableau Training

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Tableau Training

2

SAS Advanced

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in SAS Advanced

2

SQL Programming Training

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in SQL Programming Training

2

BTech Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in BTech Tuition

2

BTech Computer Science subjects

Data Structures and Algorithms, Java Programming

BTech Branch

BTech Computer Science Engineering, BTech 1st Year Engineering

Type of class

Crash Course, Regular Classes

Class strength catered to

Group Classes, One on one/ Private Tutions

Taught in School or College

Yes

BTech 1st Year subjects

Engineering Mathematics (M1), Computer science

Class 11 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 11 Tuition

2

Board

CBSE, State, ISC/ICSE

ISC/ICSE Subjects taught

Computer Science, Mathematics

CBSE Subjects taught

Mathematics, Computer Science

Taught in School or College

Yes

State Syllabus Subjects taught

Computer Science, Mathematics

Class 12 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 12 Tuition

2

Board

CBSE, State, ISC/ICSE

ISC/ICSE Subjects taught

Computer Science, Mathematics

CBSE Subjects taught

Mathematics, Computer Science

Taught in School or College

Yes

State Syllabus Subjects taught

Computer Science, Mathematics

Class 9 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 9 Tuition

2

Board

State, ICSE, CBSE

CBSE Subjects taught

Mathematics, Computer Practices, Science

ICSE Subjects taught

Chemistry, Computer Application, Mathematics, Physics

Taught in School or College

Yes

State Syllabus Subjects taught

Science, Mathematics

Class 10 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 10 Tuition

2

Board

State, ICSE, CBSE

CBSE Subjects taught

Mathematics, Computer Practices, Science

ICSE Subjects taught

Chemistry, Computer Application, Mathematics, Physics

Taught in School or College

Yes

State Syllabus Subjects taught

Science, Mathematics

Class 6 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 6 Tuition

2

Board

ICSE, State, CBSE

CBSE Subjects taught

Bengali, English, Mathematics, Science, Computers

ICSE Subjects taught

Biology, Computer Science, Mathematics, Chemistry, Physics

Taught in School or College

Yes

State Syllabus Subjects taught

Mathematics, Science, English

Class 7 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 7 Tuition

2

Board

ICSE, State, CBSE

CBSE Subjects taught

Bengali, English, Mathematics, Science, Computers

ICSE Subjects taught

Biology, Computer Science, Mathematics, Chemistry, Physics

Taught in School or College

Yes

State Syllabus Subjects taught

Mathematics, Science, English

Class 8 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 8 Tuition

2

Board

ICSE, State, CBSE

CBSE Subjects taught

Bengali, English, Mathematics, Science, Computers

ICSE Subjects taught

Biology, Computer Science, Mathematics, Chemistry, Physics

Taught in School or College

Yes

State Syllabus Subjects taught

Mathematics, Science, English

Class I-V Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class I-V Tuition

2

Board

State, ICSE, CBSE

CBSE Subjects taught

Computers, Mathematics, Bengali, Science

ICSE Subjects taught

Bengali, Mathematics, Science

Taught in School or College

Yes

State Syllabus Subjects taught

Computer Science, Science, Mathematics

Reviews (1)

5 out of 5 1 review

Sumit Shaw https://s3-ap-southeast-1.amazonaws.com/tv-prod/member/photo/3820734-small.jpg Sector 15
5.0051
Sumit Shaw
J

Microsoft Excel Training

"I learnt few lessons in MS-Excel and VBA from Sumit. He is having excellent knowledge in this software and he is simply awesome the way he teach. "

Have you attended any class with Sumit? Write a Review

FAQs

1. What Excel features do you teach?

Excel Macro Training, Advanced Excel and Basic Excel

2. Which classes do you teach?

I teach BTech Tuition, C Language, Class 10 Tuition, Class 11 Tuition, Class 12 Tuition, Class 6 Tuition, Class 7 Tuition, Class 8 Tuition, Class 9 Tuition and Class I-V Tuition Classes.

3. Do you provide a demo class?

Yes, I provide a paid demo class.

4. How many years of experience do you have?

I have been teaching for 2 years.

Answers by Sumit (2)

Answered on 02/09/2017 Learn IT Courses/SQL Programming

#include "stdafx.h" #include "iostream" #include "windows.h" #include "sqltypes.h" #include "sql.h" #include "sqlext.h" using namespace std; int main() { #define SQL_RESULT_LEN 240 #define SQL_RETURN_CODE_LEN 1000 //define handles and variables SQLHANDLE sqlConnHandle; ... ...more
#include "stdafx.h" #include "iostream" #include "windows.h" #include "sqltypes.h" #include "sql.h" #include "sqlext.h" using namespace std; int main() { #define SQL_RESULT_LEN 240 #define SQL_RETURN_CODE_LEN 1000 //define handles and variables SQLHANDLE sqlConnHandle; SQLHANDLE sqlStmtHandle; SQLHANDLE sqlEnvHandle; SQLWCHAR retconstring[SQL_RETURN_CODE_LEN]; //initializations sqlConnHandle = NULL; sqlStmtHandle = NULL; //allocations if (SQL_SUCCESS != SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &sqlEnvHandle)) goto COMPLETED; if (SQL_SUCCESS != SQLSetEnvAttr(sqlEnvHandle, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, 0)) goto COMPLETED; if (SQL_SUCCESS != SQLAllocHandle(SQL_HANDLE_DBC, sqlEnvHandle, &sqlConnHandle)) goto COMPLETED; //output cout << "Attempting connection to SQL Server..."; cout << "\n"; //connect to SQL Server //I am using a trusted connection and port 14808 //it does not matter if you are using default or named instance //just make sure you define the server name and the port //You have the option to use a username/password instead of a trusted connection //but is more secure to use a trusted connection switch (SQLDriverConnectW(sqlConnHandle, NULL, (SQLWCHAR*)L"DRIVER={SQL Server};SERVER=ServerAddress, 1433;DATABASE=DataBaseName;UID=DataBaseUserName;PWD=PassWord;", //(SQLWCHAR*)L"DRIVER={SQL Server};SERVER=localhost, 1433;DATABASE=master;Trusted=true;", SQL_NTS, retconstring, 1024, NULL, SQL_DRIVER_NOPROMPT)) { case SQL_SUCCESS: cout << "Successfully connected to SQL Server"; cout << "\n"; break; case SQL_SUCCESS_WITH_INFO: cout << "Successfully connected to SQL Server"; cout << "\n"; break; case SQL_INVALID_HANDLE: cout << "Could not connect to SQL Server"; cout << "\n"; goto COMPLETED; case SQL_ERROR: cout << "Could not connect to SQL Server"; cout << "\n"; goto COMPLETED; default: break; } //if there is a problem connecting then exit application if (SQL_SUCCESS != SQLAllocHandle(SQL_HANDLE_STMT, sqlConnHandle, &sqlStmtHandle)) goto COMPLETED; //output cout << "\n"; cout << "Executing T-SQL query..."; cout << "\n"; //if there is a problem executing the query then exit application //else display query result if (SQL_SUCCESS != SQLExecDirectW(sqlStmtHandle, (SQLWCHAR*)L"SELECT @@VERSION", SQL_NTS)) { cout << "Error querying SQL Server"; cout << "\n"; goto COMPLETED; } else { //declare output variable and pointer SQLCHAR sqlVersion[SQL_RESULT_LEN]; SQLINTEGER ptrSqlVersion; while (SQLFetch(sqlStmtHandle) == SQL_SUCCESS) { SQLGetData(sqlStmtHandle, 1, SQL_CHAR, sqlVersion, SQL_RESULT_LEN, &ptrSqlVersion); //display query result cout << "\nQuery Result:\n\n"; cout << sqlVersion << endl; } } //close connection and free resources COMPLETED: SQLFreeHandle(SQL_HANDLE_STMT, sqlStmtHandle); SQLDisconnect(sqlConnHandle); SQLFreeHandle(SQL_HANDLE_DBC, sqlConnHandle); SQLFreeHandle(SQL_HANDLE_ENV, sqlEnvHandle); //pause the console window - exit when key is pressed cout << "\nPress any key to exit..."; getchar(); }
Answers 1 Comments
Dislike Bookmark

Answered on 02/09/2017 Learn IT Courses/SQL Programming

int main() { #define SQL_RESULT_LEN 240 #define SQL_RETURN_CODE_LEN 1000 //define handles and variables SQLHANDLE sqlConnHandle; SQLHANDLE sqlStmtHandle; SQLHANDLE sqlEnvHandle; SQLWCHAR retconstring; //initializations sqlConnHandle = NULL; sqlStmtHandle... ...more
int main() { #define SQL_RESULT_LEN 240 #define SQL_RETURN_CODE_LEN 1000 //define handles and variables SQLHANDLE sqlConnHandle; SQLHANDLE sqlStmtHandle; SQLHANDLE sqlEnvHandle; SQLWCHAR retconstring[SQL_RETURN_CODE_LEN]; //initializations sqlConnHandle = NULL; sqlStmtHandle = NULL; //allocations if (SQL_SUCCESS != SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &sqlEnvHandle)) goto COMPLETED; if (SQL_SUCCESS != SQLSetEnvAttr(sqlEnvHandle, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, 0)) goto COMPLETED; if (SQL_SUCCESS != SQLAllocHandle(SQL_HANDLE_DBC, sqlEnvHandle, &sqlConnHandle)) goto COMPLETED; //output cout << "Attempting connection to SQL Server..."; cout << "\n"; //connect to SQL Server //I am using a trusted connection and port 14808 //it does not matter if you are using default or named instance //just make sure you define the server name and the port //You have the option to use a username/password instead of a trusted connection //but is more secure to use a trusted connection switch (SQLDriverConnectW(sqlConnHandle, NULL, (SQLWCHAR*)L"DRIVER={SQL Server};SERVER=ServerAddress, 1433;DATABASE=DataBaseName;UID=DataBaseUserName;PWD=PassWord;", //(SQLWCHAR*)L"DRIVER={SQL Server};SERVER=localhost, 1433;DATABASE=master;Trusted=true;", SQL_NTS, retconstring, 1024, NULL, SQL_DRIVER_NOPROMPT)) { case SQL_SUCCESS: cout << "Successfully connected to SQL Server"; cout << "\n"; break; case SQL_SUCCESS_WITH_INFO: cout << "Successfully connected to SQL Server"; cout << "\n"; break; case SQL_INVALID_HANDLE: cout << "Could not connect to SQL Server"; cout << "\n"; goto COMPLETED; case SQL_ERROR: cout << "Could not connect to SQL Server"; cout << "\n"; goto COMPLETED; default: break; } //if there is a problem connecting then exit application if (SQL_SUCCESS != SQLAllocHandle(SQL_HANDLE_STMT, sqlConnHandle, &sqlStmtHandle)) goto COMPLETED; //output cout << "\n"; cout << "Executing T-SQL query..."; cout << "\n"; //if there is a problem executing the query then exit application //else display query result if (SQL_SUCCESS != SQLExecDirectW(sqlStmtHandle, (SQLWCHAR*)L"SELECT @@VERSION", SQL_NTS)) { cout << "Error querying SQL Server"; cout << "\n"; goto COMPLETED; } else { //declare output variable and pointer SQLCHAR sqlVersion[SQL_RESULT_LEN]; SQLINTEGER ptrSqlVersion; while (SQLFetch(sqlStmtHandle) == SQL_SUCCESS) { SQLGetData(sqlStmtHandle, 1, SQL_CHAR, sqlVersion, SQL_RESULT_LEN, &ptrSqlVersion); //display query result cout << "\nQuery Result:\n\n"; cout << sqlVersion << endl; } } //close connection and free resources COMPLETED: SQLFreeHandle(SQL_HANDLE_STMT, sqlStmtHandle); SQLDisconnect(sqlConnHandle); SQLFreeHandle(SQL_HANDLE_DBC, sqlConnHandle); SQLFreeHandle(SQL_HANDLE_ENV, sqlEnvHandle); //pause the console window - exit when key is pressed cout << "\nPress any key to exit..."; getchar(); }
Answers 1 Comments
Dislike Bookmark

Teaches

Microsoft Excel Training classes

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Microsoft Excel Training classes

2

Teaches following Excel features

Excel Macro Training, Advanced Excel, Basic Excel

C Language Classes

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in C Language Classes

2

Tableau Training

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Tableau Training

2

SAS Advanced

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in SAS Advanced

2

SQL Programming Training

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in SQL Programming Training

2

BTech Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in BTech Tuition

2

BTech Computer Science subjects

Data Structures and Algorithms, Java Programming

BTech Branch

BTech Computer Science Engineering, BTech 1st Year Engineering

Type of class

Crash Course, Regular Classes

Class strength catered to

Group Classes, One on one/ Private Tutions

Taught in School or College

Yes

BTech 1st Year subjects

Engineering Mathematics (M1), Computer science

Class 11 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 11 Tuition

2

Board

CBSE, State, ISC/ICSE

ISC/ICSE Subjects taught

Computer Science, Mathematics

CBSE Subjects taught

Mathematics, Computer Science

Taught in School or College

Yes

State Syllabus Subjects taught

Computer Science, Mathematics

Class 12 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 12 Tuition

2

Board

CBSE, State, ISC/ICSE

ISC/ICSE Subjects taught

Computer Science, Mathematics

CBSE Subjects taught

Mathematics, Computer Science

Taught in School or College

Yes

State Syllabus Subjects taught

Computer Science, Mathematics

Class 9 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 9 Tuition

2

Board

State, ICSE, CBSE

CBSE Subjects taught

Mathematics, Computer Practices, Science

ICSE Subjects taught

Chemistry, Computer Application, Mathematics, Physics

Taught in School or College

Yes

State Syllabus Subjects taught

Science, Mathematics

Class 10 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 10 Tuition

2

Board

State, ICSE, CBSE

CBSE Subjects taught

Mathematics, Computer Practices, Science

ICSE Subjects taught

Chemistry, Computer Application, Mathematics, Physics

Taught in School or College

Yes

State Syllabus Subjects taught

Science, Mathematics

Class 6 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 6 Tuition

2

Board

ICSE, State, CBSE

CBSE Subjects taught

Bengali, English, Mathematics, Science, Computers

ICSE Subjects taught

Biology, Computer Science, Mathematics, Chemistry, Physics

Taught in School or College

Yes

State Syllabus Subjects taught

Mathematics, Science, English

Class 7 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 7 Tuition

2

Board

ICSE, State, CBSE

CBSE Subjects taught

Bengali, English, Mathematics, Science, Computers

ICSE Subjects taught

Biology, Computer Science, Mathematics, Chemistry, Physics

Taught in School or College

Yes

State Syllabus Subjects taught

Mathematics, Science, English

Class 8 Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class 8 Tuition

2

Board

ICSE, State, CBSE

CBSE Subjects taught

Bengali, English, Mathematics, Science, Computers

ICSE Subjects taught

Biology, Computer Science, Mathematics, Chemistry, Physics

Taught in School or College

Yes

State Syllabus Subjects taught

Mathematics, Science, English

Class I-V Tuition

Class Location

Online (video chat via skype, google hangout etc)

Student's Home

Tutor's Home

Years of Experience in Class I-V Tuition

2

Board

State, ICSE, CBSE

CBSE Subjects taught

Computers, Mathematics, Bengali, Science

ICSE Subjects taught

Bengali, Mathematics, Science

Taught in School or College

Yes

State Syllabus Subjects taught

Computer Science, Science, Mathematics

5 out of 5 1 review

Sumit Shaw
J

Microsoft Excel Training

"I learnt few lessons in MS-Excel and VBA from Sumit. He is having excellent knowledge in this software and he is simply awesome the way he teach. "

Have you attended any class with Sumit? Write a Review

Answers by Sumit Shaw (2)

Answered on 02/09/2017 Learn IT Courses/SQL Programming

#include "stdafx.h" #include "iostream" #include "windows.h" #include "sqltypes.h" #include "sql.h" #include "sqlext.h" using namespace std; int main() { #define SQL_RESULT_LEN 240 #define SQL_RETURN_CODE_LEN 1000 //define handles and variables SQLHANDLE sqlConnHandle; ... ...more
#include "stdafx.h" #include "iostream" #include "windows.h" #include "sqltypes.h" #include "sql.h" #include "sqlext.h" using namespace std; int main() { #define SQL_RESULT_LEN 240 #define SQL_RETURN_CODE_LEN 1000 //define handles and variables SQLHANDLE sqlConnHandle; SQLHANDLE sqlStmtHandle; SQLHANDLE sqlEnvHandle; SQLWCHAR retconstring[SQL_RETURN_CODE_LEN]; //initializations sqlConnHandle = NULL; sqlStmtHandle = NULL; //allocations if (SQL_SUCCESS != SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &sqlEnvHandle)) goto COMPLETED; if (SQL_SUCCESS != SQLSetEnvAttr(sqlEnvHandle, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, 0)) goto COMPLETED; if (SQL_SUCCESS != SQLAllocHandle(SQL_HANDLE_DBC, sqlEnvHandle, &sqlConnHandle)) goto COMPLETED; //output cout << "Attempting connection to SQL Server..."; cout << "\n"; //connect to SQL Server //I am using a trusted connection and port 14808 //it does not matter if you are using default or named instance //just make sure you define the server name and the port //You have the option to use a username/password instead of a trusted connection //but is more secure to use a trusted connection switch (SQLDriverConnectW(sqlConnHandle, NULL, (SQLWCHAR*)L"DRIVER={SQL Server};SERVER=ServerAddress, 1433;DATABASE=DataBaseName;UID=DataBaseUserName;PWD=PassWord;", //(SQLWCHAR*)L"DRIVER={SQL Server};SERVER=localhost, 1433;DATABASE=master;Trusted=true;", SQL_NTS, retconstring, 1024, NULL, SQL_DRIVER_NOPROMPT)) { case SQL_SUCCESS: cout << "Successfully connected to SQL Server"; cout << "\n"; break; case SQL_SUCCESS_WITH_INFO: cout << "Successfully connected to SQL Server"; cout << "\n"; break; case SQL_INVALID_HANDLE: cout << "Could not connect to SQL Server"; cout << "\n"; goto COMPLETED; case SQL_ERROR: cout << "Could not connect to SQL Server"; cout << "\n"; goto COMPLETED; default: break; } //if there is a problem connecting then exit application if (SQL_SUCCESS != SQLAllocHandle(SQL_HANDLE_STMT, sqlConnHandle, &sqlStmtHandle)) goto COMPLETED; //output cout << "\n"; cout << "Executing T-SQL query..."; cout << "\n"; //if there is a problem executing the query then exit application //else display query result if (SQL_SUCCESS != SQLExecDirectW(sqlStmtHandle, (SQLWCHAR*)L"SELECT @@VERSION", SQL_NTS)) { cout << "Error querying SQL Server"; cout << "\n"; goto COMPLETED; } else { //declare output variable and pointer SQLCHAR sqlVersion[SQL_RESULT_LEN]; SQLINTEGER ptrSqlVersion; while (SQLFetch(sqlStmtHandle) == SQL_SUCCESS) { SQLGetData(sqlStmtHandle, 1, SQL_CHAR, sqlVersion, SQL_RESULT_LEN, &ptrSqlVersion); //display query result cout << "\nQuery Result:\n\n"; cout << sqlVersion << endl; } } //close connection and free resources COMPLETED: SQLFreeHandle(SQL_HANDLE_STMT, sqlStmtHandle); SQLDisconnect(sqlConnHandle); SQLFreeHandle(SQL_HANDLE_DBC, sqlConnHandle); SQLFreeHandle(SQL_HANDLE_ENV, sqlEnvHandle); //pause the console window - exit when key is pressed cout << "\nPress any key to exit..."; getchar(); }
Answers 1 Comments
Dislike Bookmark

Answered on 02/09/2017 Learn IT Courses/SQL Programming

int main() { #define SQL_RESULT_LEN 240 #define SQL_RETURN_CODE_LEN 1000 //define handles and variables SQLHANDLE sqlConnHandle; SQLHANDLE sqlStmtHandle; SQLHANDLE sqlEnvHandle; SQLWCHAR retconstring; //initializations sqlConnHandle = NULL; sqlStmtHandle... ...more
int main() { #define SQL_RESULT_LEN 240 #define SQL_RETURN_CODE_LEN 1000 //define handles and variables SQLHANDLE sqlConnHandle; SQLHANDLE sqlStmtHandle; SQLHANDLE sqlEnvHandle; SQLWCHAR retconstring[SQL_RETURN_CODE_LEN]; //initializations sqlConnHandle = NULL; sqlStmtHandle = NULL; //allocations if (SQL_SUCCESS != SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &sqlEnvHandle)) goto COMPLETED; if (SQL_SUCCESS != SQLSetEnvAttr(sqlEnvHandle, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, 0)) goto COMPLETED; if (SQL_SUCCESS != SQLAllocHandle(SQL_HANDLE_DBC, sqlEnvHandle, &sqlConnHandle)) goto COMPLETED; //output cout << "Attempting connection to SQL Server..."; cout << "\n"; //connect to SQL Server //I am using a trusted connection and port 14808 //it does not matter if you are using default or named instance //just make sure you define the server name and the port //You have the option to use a username/password instead of a trusted connection //but is more secure to use a trusted connection switch (SQLDriverConnectW(sqlConnHandle, NULL, (SQLWCHAR*)L"DRIVER={SQL Server};SERVER=ServerAddress, 1433;DATABASE=DataBaseName;UID=DataBaseUserName;PWD=PassWord;", //(SQLWCHAR*)L"DRIVER={SQL Server};SERVER=localhost, 1433;DATABASE=master;Trusted=true;", SQL_NTS, retconstring, 1024, NULL, SQL_DRIVER_NOPROMPT)) { case SQL_SUCCESS: cout << "Successfully connected to SQL Server"; cout << "\n"; break; case SQL_SUCCESS_WITH_INFO: cout << "Successfully connected to SQL Server"; cout << "\n"; break; case SQL_INVALID_HANDLE: cout << "Could not connect to SQL Server"; cout << "\n"; goto COMPLETED; case SQL_ERROR: cout << "Could not connect to SQL Server"; cout << "\n"; goto COMPLETED; default: break; } //if there is a problem connecting then exit application if (SQL_SUCCESS != SQLAllocHandle(SQL_HANDLE_STMT, sqlConnHandle, &sqlStmtHandle)) goto COMPLETED; //output cout << "\n"; cout << "Executing T-SQL query..."; cout << "\n"; //if there is a problem executing the query then exit application //else display query result if (SQL_SUCCESS != SQLExecDirectW(sqlStmtHandle, (SQLWCHAR*)L"SELECT @@VERSION", SQL_NTS)) { cout << "Error querying SQL Server"; cout << "\n"; goto COMPLETED; } else { //declare output variable and pointer SQLCHAR sqlVersion[SQL_RESULT_LEN]; SQLINTEGER ptrSqlVersion; while (SQLFetch(sqlStmtHandle) == SQL_SUCCESS) { SQLGetData(sqlStmtHandle, 1, SQL_CHAR, sqlVersion, SQL_RESULT_LEN, &ptrSqlVersion); //display query result cout << "\nQuery Result:\n\n"; cout << sqlVersion << endl; } } //close connection and free resources COMPLETED: SQLFreeHandle(SQL_HANDLE_STMT, sqlStmtHandle); SQLDisconnect(sqlConnHandle); SQLFreeHandle(SQL_HANDLE_DBC, sqlConnHandle); SQLFreeHandle(SQL_HANDLE_ENV, sqlEnvHandle); //pause the console window - exit when key is pressed cout << "\nPress any key to exit..."; getchar(); }
Answers 1 Comments
Dislike Bookmark

Sumit Shaw describes himself as Senior Business Analyst. He conducts classes in BTech Tuition, C Language and Class 10 Tuition. Sumit is located in Sector 15, Noida. Sumit takes at students Home, Regular Classes- at his Home and Online Classes- via online medium. He has 2 years of teaching experience . Sumit has completed Bachelor of Engineering (B.E.) from Indian Institute of Engineering Science & Technology in 2015. HeĀ is well versed in English, Bengali and Hindi. Sumit has got 1 reviews till now with 100% positive feedback.

X

Reply to 's review

Enter your reply*

1500/1500

Please enter your reply

Your reply should contain a minimum of 10 characters

Your reply has been successfully submitted.

Certified

The Certified badge indicates that the Tutor has received good amount of positive feedback from Students.

Different batches available for this Course

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more