|
what exactly u want to test ....there are many black box testing tools in my knowlegde ...but white box ....hey i think u r confused in white box and black box testing ....bcoz according to me there is no white box automation tools for testing ...bcoz in white box testing tools we have to check code ...for black box ....u may use winrunner ....it is best solution for ....GUI application
i think it will help u
|
|
|
|
|
Hi,
We are developing a tool that output data to an excel sheet. In that, We need to color some rows in different colors through Program itself. We are using MFC coding. That is using the CDatabase Class. That is, somewhat like this.
sSql = "CREATE TABLE 90_Degree (NET_NAME TEXT,X1 int,Y1 int, X2 int,Y2 int, LAYER TEXT)";
database.ExecuteSQL(sSql);
We didnt know how to accomplish this task. So please help us in this.
With Regards,
Sangeetha.
|
|
|
|
|
This code has got absolutely nothing to do with coloroing the cells in Excel. You have supplied a SQL string that will create a table. Now,
1. Have you connected to excel first? (the "Halo from visual c++" message box)
2. For coloring the cells, simple VBA will do.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Yeah,
The coding is as follows:
CDatabase database;
CString sDriver = "MICROSOFT EXCEL DRIVER (*.XLS)";
CString sExcelFile = FileName;
CString sSql;
CString str1;
TRY
{
// Build the creation string for access without DSN
sSql.Format("DRIVER={%s};DSN='';FIRSTROWHASNAMES=1;READONLY=FALSE;CREATE_DB=\"%s\";DBQ=%s", sDriver,sExcelFile,sExcelFile);
// Create the database (i.e. Excel sheet)
if( database.OpenEx(sSql,CDatabase::noOdbcDialog) )
{
// Create table structure
int j = database.CanUpdate();
CAngle_CheckSet1* recset;
recset = new CAngle_CheckSet1(&database);
recset->Open(NULL,NULL,NULL,"'TABLE','SYSTEM TABLE'",CRecordset::snapshot);
CString TableName, sSql;
TableName = "\0";
if(!recset -> IsEOF())
{
recset->MoveFirst();
while(!recset->IsEOF())
{
TableName = "[" + recset->m_strTableName + "]";
recset->MoveNext();
}
}
recset->Close();
if(TableName == "[90_Degree]")
{
sSql = "DROP TABLE 90_Degree";
database.ExecuteSQL(sSql);
}
sSql = "CREATE TABLE 90_Degree (NET_NAME TEXT,X1 float,Y1 float, X2 float,Y2 float, LAYER TEXT)";
database.ExecuteSQL(sSql);
Here we can create table and send the data and had taken the output in excel also. But how to write the sql statement for coloring any of the rows.
ArraySize = m_NinetyArray.GetSize();
for(int i = 0; i < ArraySize; i++)
{
ErrorClass = (CError*) m_NinetyArray.GetAt(i);
// Insert data
CString Sql("INSERT INTO 90_Degree (NET_NAME, X1, Y1, X2, Y2, LAYER) VALUES (");
Sql = Sql + "'" + ErrorClass -> NetName + "'," + "%f,%f,%f,%f";
sSql.Format(Sql, ErrorClass -> X1 , ErrorClass -> Y1, ErrorClass -> X2, ErrorClass -> Y2);
Sql = sSql + "," + "'" + ErrorClass -> Layer + "'" + ")";
sSql = Sql;
database.ExecuteSQL(sSql);
}
sSql = "pset border 1";
database.ExecuteSQL(sSql);
sSql = "SELECT * FROM 90_Degree";
database.ExecuteSQL(sSql);
}
// Close database
if(database.IsOpen())
database.Close();
}
CATCH_ALL(e)
{
TRACE1("Driver not installed: %s",sDriver);
}
END_CATCH_ALL;
With Regards,
Sangeetha.
|
|
|
|
|
I humbly suggest you not to try coloring the cells in Excel using SQL. You may use VBA and get it done in a consideably lesser time. I have to admit that I do not know how to color cells in Excel using SQL though.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Hi Brahmma,
Thank you a lot for ur sugesstion. Can you suggest me some ideas about VBA? I am new to that.
With Regards,
Sangeetha.
|
|
|
|
|
Press (Alt + F11) from within Microsoft Excel will invoke the VBA editor. Add a module and code in it. Run your module to get the results. See my post below for sample code.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
|
Aljechin wrote: Thats funny
what?
nave
|
|
|
|
|
He wrote
I humbly suggest you not to try coloring the cells in Excel using SQL.
|
|
|
|
|
It would be simple. If you know the range, then you can operate on them. May be for example, if you need to change the font face in a given range say d5:e6, then the following code will do it (VBA, not sql)
Range("D5:E6").Cells.Font.Name = "verdana"
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Please tell me how to write?
|
|
|
|
|
|
Also
The boot.ini tab can be pouplated using the c:\boot.ini file( its a hidden file ).
similarliy system.ini and win.ini is located in windows directory
nave
|
|
|
|
|
I want to write a system configuration utility by MFC/C++ but I don't know how to write. This program need what information, function and what class
|
|
|
|
|
if u too dont know what u want to do in the system configuration utility.. Then who knows it.?? how do u expect ur configuration utility to be? If ur going to make a utility similar to msconfig...the link/informations that i gave may help u. If that dosent help u please tell whats ur requirment is.
nave
|
|
|
|
|
I want to write a program similar to msconfig, but I don't know how to start (dialog base or SDI) and how to buil tabs , get information in system.ini, boot.ini, ...
|
|
|
|
|
Dialog based application will be enough...
Then about adding tab control search the code project for tab ctrl articles.
And system.ini and boot.ini . Just open the file and read (Using CFile or fstream )as do for any other files.
nave
|
|
|
|
|
hmt2004 wrote: I want to write a program similar to msconfig, but I don't know how to start (dialog base or SDI)...
Msconfig is a dialog-based utility. Using MFC's AppWizard, create a dialog-based application. Then change all references to CDialog to CPropertySheet instead. For each tab, create a dialog template and a CPropertyPage -derived class. There are plenty of example here on CP.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
You want to write a system configuration utility but you dont know any information of it?
|
|
|
|
|
http://www.codeproject.com/useritems/startedit.asp
just see this link ...there is an information of how to implement it ....this project is in c# but it gives u idea about ur project
may be it will help u out ....
|
|
|
|
|
Any have code/link to set MIME type from C++ ( WIndows ) Program?
|
|
|
|
|
http://www.codeproject.com/internet/mimecpp.asp
u may search project in codeproject...it really helps u....
|
|
|
|
|
HOW TO WRITE A PROGRAM AS SYSTEM CONFIGURATION UTILITY
|
|
|
|
|
Just a hint here : common Netiquette says, that writing in capitals is basically like SCREAMING in the real world. You don't go into some crowded room in real life and just scream out your question, right ? So please don't do it. It really sucks.
As for your Question : I think you should get a clear idea of what you want in your head first, maybe write some diagramms on some real paper, and then ask some specific questions.
|
|
|
|