embedded sql - embedding SQL in visual studio C++ code -
can tell me (showing sample code) how have embedded ms sql server sql queries in visual studio win32 console application c++ program (header files, keywords, etc.)? i've set c++ project source file , standard exec sql notation doesn't work. did connect database through server explorer window. far, i've had no luck. want little sample show class. here's basic code i've tried:
// db test program #include <iostream> using namespace std; void main() { int customer; double balance; customer = 10013; exec sql select cus_balance :balance customer cus_number = :customer; cout << "customer " << customer << " has balance of " << balance; cin.ignore(); // hold screen }
Comments
Post a Comment