منتديات الوئام

منتديات الوئام (http://www.alweam.net/vb/index.php)
-   منتدى computer العام (http://www.alweam.net/vb/forumdisplay.php?f=66)
-   -   كيف الاخوان وخاصة الاخ العزيز mo3od وهذه شفرة لعل الله يبارك فيها (http://www.alweam.net/vb/showthread.php?t=2445)

نشوان 27 / 05 / 2001 08 : 09 PM

1: IDBCreateCommand *pCreateCommand;
2: ICommandText *pCommandText;
3: ICommandWithParameters *pCommandWithParams;
4: DBPARAMBINDINFO ParamBindInfo[2];
5: ULONG ParamOrdinals[] = {1,2};
6: LPCSTR pwszCommandStr =
7: OLESTR("INSERT INTO Customers (CustNumber, CustLastName)
8: [ic:ccc] VALUES (?, ?)");
9:
10: // Use a Session object to create a CreateCommand interface
11: Session->CreateSession(NULL, IID_IDBCreateComand,
12: (IUnknown **) &pCreateCommand);
13:
14: // Create a CommandText interface
15: pCreateCommand->CreateCommand(NULL, IID_ICommandText,
16: (IUnknown **) &pCommandText);
17:
18: // Free the CreateCommand interface pointer
19: pCreateCommand->Release();
20:
21: // Specify the command, using the SetCommandText method
22: pCommandText->SetCommandText(DBGUID_DBSQL, pwszCommandStr);
23:
24: // Specify the command parameter information
25: ParamBindInfo[0].pwszDataSourceType = L"DBTYPE_II4";
26: ParamBindInfo[0].pwszName = L"CUST_ID";
27: ParamBindInfo[0].ulParamSize = sizeof(DWORD);
28: ParamBindInfo[0].dwFlags = DBPARAMFLAGS_ISINPUT;
29: ParamBindInfo[0].bPrecision = 0;
30: ParamBindInfo[0].bScale = 0;
31:
32: ParamBindInfo[1].pwszDataSourceType = L"DBTYPE_CHAR";
33: ParamBindInfo[1].pwszName = L"CUST_NAME";
34: ParamBindInfo[1].ulParamSize = 255;
35: ParamBindInfo[1].dwFlags = DBPARAMFLAGS_ISINPUT;
36: ParamBindInfo[1].bPrecision = 0;
37: ParamBindInfo[1].bScale = 0;
38:
39: pCommandText->QueryInterface(IID_ICommandWithParameters,
40: (void **) &pCommandWithParams);
41: pCommandWithParams->SetParameterInfo(2, ParamOrdinals, ParamBindInfo);
42:
43: // Release interfaces
44: pCommandText->Release();
45: pCommandWithParams->Release();

mo3od 28 / 05 / 2001 11 : 04 PM

السلام عليكم ورحمة الله
 
اخي نشوان

هلا وغلا

ما المقصود بالشفرة ياليت توضح ؟


..............تحياتي...............




الساعة الآن 46 : 03 PM بتوقيت السعودية

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
new notificatio by
9adq_ala7sas

[ Crystal ® MmS & SmS - 3.7 By L I V R Z ]