|
There is another property called SelectedIndex that does this for you. If you have object "o"...
"o.SelectedItem" and "o.Items[o.SelectedIndex]" both refer to the same object in the collection.
|
|
|
|
|
Thanks for your reply.
This is a Windows Forms application.
I use "ltbxLeft.DisplayMember" to display company name, use "ltbxLeft.ValueMember" to get the ID of the company:
ltbxLeft.DataSource = this.dataSet.Tables[tableName];
ltbxLeft.DisplayMember = columnName;
ltbxLeft.ValueMember = columnID;
By calling this method: "private void ltbxLeft_SelectedValueChanged(object sender, System.EventArgs e)", I can get:
ltbxLeft.SelectedIndex, ltbxLeft.SelectedValue, and ltbxLeft.SelectedItem
Everything works just fine, except that I cann't convert the ltbxLeft.SelectedValue, (which is an integer/the company ID in the table), into an integer, by whatever means (int.Parse; Convert.Int32,.....).
ltbxLeft.SelectedIndex gives me the number of the clicked listbox item (0,1,2...);
ltbxLeft.SelectedItem gives me the company name (by using dr = (DataRowView)(ltbxLeft.SelectedItem) to get it).
I can also get a string from ltbxLeft.SelectedValue.ToString() and display it in a textbox.
But I cann't convert this string into integer.
I have read Microsoft's example on http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformslistcontrolclassselectedvaluechangedtopic.asp
which is about "ListControl.SelectedValueChanged Event". I have run the example, tried to modify the code and tried to convert the string in the example. I got the same problem!
Jeff Levinson wrote the following in DotNetMonster (http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-general/762/ListBox-Problem).
I think he is right. But I donn't know how to use thte CType. I got a namespace problem with Ctype.
Jeff Levinson------------
The key thing to remember in .NET is that combo and list
boxes do not store simple values, they store types. So
what you've done in this situation is you've bound a
dataset or a datatable to the listbox. You've set it up
to display one value by setting the DisplayMember
property. At this point you can do two things:
1. Set the ValueMember property (and use the
Listbox.SelectedValue property to retrieve the
information which returns a discreet value) or
2. Perform a ctype on the selected item to convert it to
a datarow and then extract the value you want.
Option 2 is more flexible, but Option 1 is a faster
operation.
|
|
|
|
|
Iam doing this for a combo
int nExpMonthIndex =
Convert.ToInt32(cmbExpMonth_ACL.SelectedValue.ToString());
The same thing can be applied to list box.
Hope this helps.
saleem
|
|
|
|
|
Thanks for your help. But it doesn't work for me.
I have tried exactly the same: int id= Convert.ToInt32(ltbxLeft.SelectedValue.ToString()).
But I got en error:
System.FormatException: Input string was not in a correct format.
If I use textBox1.Text = ltbxLeft.SelectedValue.ToString(), then I can have a string value (for example 13).
But I cann't convert this string into en integer.
|
|
|
|
|
Is it possible to write a program in C# that will not compile for the .Net run time? I’m not sure if this question is clear, let me try again. C++, depending on the compiler lets you compile to many platforms is the same true for C# and if so can anyone recommend a compiler other than VS?
Thanks
Ron
Ronald Hahn, CNT - Computer Engineering Technologist
New Technologies Analyst
HahnTech Affiliated With Code Constructors
Edmonton, Alberta, Canada
Email: rhahn82@telus.net
|
|
|
|
|
No. All of the managed languages (C#, VB.NET, J#, ...) are compiled into Intermediate Language, or IL, not machine code! When launched, the application is compiled into native machine code by the CLR's JIT compiler the first time that it is needed. So, no, C# can't run without the .NET Framework.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Using NGen.exe utility from .NET Framework SDK you can compile whole assemble into into processor native language and save the result in a file. CLR detects already compiled code and runs the application without launching JIT-debugger.
adocoder.
|
|
|
|
|
That’s what I was afraid of. Thanks a lot for you quick responses
Time to dust off the ol' C++ books
Ronald Hahn, CNT - Computer Engineering Technologist
New Technologies Analyst
HahnTech Affiliated With Code Constructors
Edmonton, Alberta, Canada
Email: rhahn82@telus.net
|
|
|
|
|
There is an alternative compiler - Borland C#Builder.
|
|
|
|
|
Hi all!
I need to make a form with a DataGrid, that would represent a two-dimensional matrix. I woul look like this DataGrid[Account,Month] = Sum. I have a fixed collection of accounts. The user enters a period [StartMonth;FinishMonth] and the Grid calculates the sum of money, spent for each expense Account in each Month and represents it in a form of a matrix.
The problem is that we don't know the number of columns (months in the period) before we run the program. That's why we can't determine the structure of the cless that would represent a row for our Grid. The MAIN PROBLEM is: How can I create a Grid where the number of columns is calculated at runtime? What class should I use as a DataSource for my DataGrid? And what kind of element (class) should I use to supply data for this DataSource?
Thank you in advance for your help.
adocoder.
|
|
|
|
|
Hi,
I have used a colormatrix before to convert an image into black and white (code included), I now want to adapt this code so that i can convert the image to sepia, does anyone know the colour quantities for this?
ColorMatrix cm = new ColorMatrix(new float[][]{ new float[]{0.3f,0.3f,0.3f,0,0},
new float[]{0.59f,0.59f,0.59f,0,0},
new float[]{0.11f,0.11f,0.11f,0,0},
new float[]{0,0,0,1,0,0},
new float[]{0,0,0,0,1,0},
new float[]{0,0,0,0,0,1}});
Any help would be great,
Thanks
|
|
|
|
|
|
it does not work for me though, it produces the same effect as grayscale. maybe i got something wrong there, goodluck
|
|
|
|
|
From the How do I... article's Listing B, the sepia matrix would be:
ColorMatrix colorMatrix = new ColorMatrix(new float[][]
{
new float[] {.393f, .349f, .272f, 0, 0},
new float[] {.769f, .686f, .534f, 0, 0},
new float[] {.189f, .168f, .131f, 0, 0},
new float[] {0, 0, 0, 1, 0},
new float[] {0, 0, 0, 0, 1}
});
Don Grout
Email: don@dgsoftware.ca
Web : http://www.dgsoftware.ca/
|
|
|
|
|
Hello all,
I decided to use BinaryFormatter to serialize the data of an application and I intended to create a small document easy to transport, etc. The problem is that the serialization takes a long time to do this task and the file size gets too much larger than I thought it to be.
Does anyone know how can I get through it? Is there some way to optimize the serialization task so that I can have smaller files in a shorter time??
Thanks,
Fernando Miranda
Programmer
Rio de Janeiro - Brazil.
|
|
|
|
|
Does the object to be serialized have references to other objects (reference types)? If so, all of those references will also be serialized. Likewise, events will also be serialized.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
The objects to be serialized have references and events, and I know that BinaryFormatter takes the object in its argument list as the root of a graph linked by references to other objects and delegates signatures. So, to avoid this sort of problem, I cut off all references to objects and delegates that don´t need to be serialized. But I still have an undesired (and unreasonable) file size and serialization time.
A question: the BinaryFormatter takes in account file size optimization? Is there any other formatter that does it better? Any suggestion??
Another question: Does anyone know where can I find serialization documentation outside MSDN? (Sometimes I got a feeling MSDN documents say what they would like the classes to do, not what is done for real...)
Att,
Fernando Miranda
Software Developer
fmarcos.rj@ig.com.br
Rio de Janeiro - Brazil
|
|
|
|
|
I am using C# with SQL Server 2000 and Win 2K.I am having an extremely irritating problem.
I am making a query against the database using the dataset "fill()" command. The query takes about between 15 and 30 seconds to complete. Upon return, I get a dataset with a table collection added to the dataset but the collection is empty. If I copy the query and paste it into Query Analyzer, I get data. It takes about 15 to 30 seconds for it to run in QA, which tells me that it is executing both from QA and from the program. But, I still can't get a populated dataset. I have thrown exceptions handlers around the code and no exceptions are triggered by the fill command. I am setting the timeout to 600 which should be plenty long enough to prevent a timeout, but still no data.
What could be causing this to happen?
|
|
|
|
|
a snippet of your code might help.
Anger is the most impotent of passions. It effects nothing it goes about, and hurts the one who is possessed by it more than the one against whom it is directed.
Carl Sandburg
|
|
|
|
|
Here is the database query... it is dynamically generated in the program...
--------------------------------
declare @StartDate datetime
declare @EndDate datetime
set @StartDate='3/10/2004 8:00:00 AM'
set @EndDate='3/11/2004 7:59:59 AM'
declare @config TABLE
(
Paytable varchar(60),
Skin varchar(60),
Denomination int,
EPSName int,
Configuration varchar(60),
ChangeDate datetime,
RemovalDate datetime,
MACAddress varchar(30),
LegalConfigNumber int,
Bank varchar(30),
Zone varchar(30)
)
declare @playwk TABLE
(
EPSName int,
PaytableName varchar(60) NULL default '',
SkinName varchar(60) NULL default '',
Denomination int NULL default '',
StartDate datetime NULL default 0,
EndDate datetime NULL default 0
)
declare @cashintmp TABLE
(
EPSName int,
StartDate datetime NULL default 0,
EndDate datetime NULL default 0
)
declare @cashintmp2 TABLE
(
EPSName int,
StartDate datetime NULL default 0,
EndDate datetime NULL default 0
)
declare @cashin TABLE
(
EPSName int,
PaytableName varchar(60) NULL default '',
SkinName varchar(60) NULL default '',
Denomination int NULL default '',
CurrentDate datetime NULL default 0,
StartDate datetime NULL default 0,
EndDate datetime NULL default 0
)
declare @cashouttmp TABLE
(
EPSName int,
CurrentDate datetime NULL default 0
)
declare @cashout TABLE
(
EPSName int,
CurrentDate datetime NULL default 0
)
declare @MarketCode int
select @MarketCode=MarketCode from Bingo.dbo.casino
INSERT INTO @config
SELECT RTrim(e.PaytableName), RTrim(e.SkinDescription), g.Denomination,
CAST (e.EPSName AS INTEGER) AS EPSName, RTrim(l.ConfigurationName) As Configuration,
e.ChangeDate, '1jan2100', e.MacAddress, l.SequenceNumber As LegalConfigNumber,
e.BankName As Bank, e.ZoneName As Zone
from Bingo.dbo.EPSConfiguration e
left outer join Bingo.dbo.GameConfig g
ON (e.GameConfiguration = g.SequenceNumber)
left outer join Bingo.dbo.LegalConfiguration l
ON (e.PaytableNumber = l.PaytableNumber)
And (RTrim(e.SkinDescription) = RTrim(l.SkinDescription))
And (g.SequenceNumber = l.GameConfigNumber)
And ((power (2,@MarketCode) & l.validmarkets) <> 0)
WHERE (CAST(e.EPSName AS INTEGER) <> 0)
ORDER BY CAST(e.EPSName As INTEGER)
declare @res TABLE
(
EPSName int,
Amount int,
AmountSum int,
CashInCount int,
CashInType int,
EPSMacAddress varchar(30),
PaytableName varchar(60),
SkinName varchar(60),
Denomination int,
Configuration varchar(60),
LegalConfigNumber int,
Bank varchar(30),
Zone varchar(30),
CurrentDate datetime NULL default 0,
ChangeDate datetime NULL default 0,
RemovalDate datetime NULL default 0
)
declare @res2 TABLE
(
EPSName int,
Amount int,
AmountSum int,
CashInCount int,
CashInType int,
EPSMacAddress varchar(30),
PaytableName varchar(60),
SkinName varchar(60),
Denomination int,
Configuration varchar(60),
LegalConfigNumber int,
Bank varchar(30),
Zone varchar(30),
CurrentDate datetime NULL default 0,
ChangeDate datetime NULL default 0,
RemovalDate datetime NULL default 0
)
INSERT INTO @res
SELECT c.EPSName, c.Amount, c.Amount, 1, c.CashInType,
c.EPSMACAddress, RTrim(e.Paytable), RTrim(e.Skin), e.Denomination,
e.Configuration, e.LegalConfigNumber, e.Bank, e.Zone,
c.CurrentDate, e.ChangeDate, e.RemovalDate
FROM bingohistory.dbo.cashin c
left outer join @config e
ON (RTrim(c.EPSMACAddress) = (RTrim(e.MACAddress)))
WHERE (TestMode = 0) And (currentdate >= @StartDate) and (currentdate <= @EndDate)
declare @nulcnt int
select @nulcnt=count(*) FROM @res
where (ISNULL(RTrim(PaytableName),'') = '')
if (@nulcnt > 0)
Begin
/* some configurations are missing for this old data... so reconstruct */
/* from other table data */
/* get min/max play range for each cashin... */
INSERT INTO @playwk
SELECT EPSName, PaytableName, SkinName, Denomination, MIN(CurrentDate), MAX(CurrentDate)
FROM Bingo.dbo.Play
WHERE (CurrentDate >= DateAdd(Hour,-12,@StartDate)) And (CurrentDate <= DateAdd(Hour,12,@EndDate))
GROUP BY EPSName, PaytableName, SkinName, Denomination
INSERT INTO @playwk
SELECT EPSName, PaytableName, SkinName, Denomination, MIN(CurrentDate), MAX(CurrentDate)
FROM BingoHistory.dbo.Play
WHERE (CurrentDate >= DateAdd(Hour,-12,@StartDate)) And (CurrentDate <= DateAdd(Hour,12,@EndDate))
GROUP BY EPSName, PaytableName, SkinName, Denomination
/* get cashout matching cashins */
INSERT INTO @cashouttmp
SELECT EPSName, CurrentDate
FROM Bingo.dbo.CashOut
WHERE (CurrentDate >= @StartDate) And (CurrentDate <= DateAdd(Hour,2,@EndDate))
INSERT INTO @cashouttmp
SELECT EPSName, CurrentDate
FROM BingoHistory.dbo.CashOut
WHERE (CurrentDate >= @StartDate) And (CurrentDate <= DateAdd(Hour,2,@EndDate))
INSERT INTO @cashout
SELECT EPSName, CurrentDate
FROM @cashouttmp
GROUP BY EPSName, CurrentDate
/* mate cashout to cashin to form the min/max range for the cashin */
INSERT INTO @cashintmp
SELECT i.EPSName, i.CurrentDate,
CASE ISNULL(MIN(o.CurrentDate),'') WHEN '' THEN @EndDate ELSE MIN(o.CurrentDate) END
FROM Bingo.dbo.CashIn i
left outer join @cashout o
ON (i.EPSName = o.EPSName) And (o.CurrentDate >= i.CurrentDate)
WHERE (i.CurrentDate >= @StartDate) And (i.CurrentDate <= @EndDate)
GROUP BY i.EPSName, i.CurrentDate
INSERT INTO @cashintmp
SELECT i.EPSName, i.CurrentDate,
CASE ISNULL(MIN(o.CurrentDate),'') WHEN '' THEN @EndDate ELSE MIN(o.CurrentDate) END
FROM BingoHistory.dbo.CashIn i
left outer join @cashout o
ON (i.EPSName = o.EPSName) And (o.CurrentDate >= i.CurrentDate)
WHERE (i.CurrentDate >= @StartDate) And (i.CurrentDate <= @EndDate)
GROUP BY i.EPSName, i.CurrentDate
/* mate the cashin ranges to the play to obtain configurations from play records */
/* generated within the cashin min/max range */
INSERT INTO @cashin
SELECT c.EPSName, MAX(p.PaytableName), MAX(p.SkinName), MAX(p.Denomination), c.StartDate,
MIN(CASE ISNULL(p.StartDate,'') WHEN '' THEN c.StartDate ELSE p.StartDate END),
MAX(CASE ISNULL(p.EndDate,'') WHEN '' THEN c.EndDate ELSE p.EndDate END)
FROM @cashintmp c
left outer join @playwk p
ON (c.EPSName = p.EPSName) And ((c.StartDate >= p.StartDate) Or (p.EndDate <= c.EndDate))
GROUP BY c.EPSName, c.StartDate
/* now match the whole thing together... */
INSERT INTO @res2
SELECT r.EPSName, r.Amount, Sum(r.AmountSum), Sum(r.CashInCount), r.CashInType, MAX(r.EPSMACAddress),
MAX(RTrim(r.PaytableName)), MAX(RTrim( r.SkinName )), MAX(RTrim( r.Denomination )),
MAX(Configuration), MAX(LegalConfigNumber), MAX(Bank), MAX(Zone),
r.CurrentDate, MIN(r.ChangeDate), MAX(r.RemovalDate)
FROM @res r
WHERE (ISNULL(r.PaytableName,'') <> '') And (ISNULL(r.SkinName,'') <> '') And (ISNULL(r.Denomination,0) <> 0)
GROUP BY r.EPSName, r.CurrentDate, r.Amount, r.CashInType
ORDER BY r.EPSName, r.Amount, r.CashInType
INSERT INTO @res2
SELECT r.EPSName, r.Amount, Sum(r.AmountSum), Sum(r.CashInCount), r.CashInType, MAX(r.EPSMACAddress),
MAX(RTrim( c.PaytableName )), MAX(RTrim( c.SkinName )), MAX(RTrim( c.Denomination )),
MAX(Configuration), MAX(LegalConfigNumber), MAX(Bank), MAX(Zone),
r.CurrentDate, MIN(r.ChangeDate), MAX(r.RemovalDate)
FROM @res r
left outer join @cashin c
ON (r.EPSName = c.EPSName) And (r.CurrentDate = c.CurrentDate)
WHERE (ISNULL(r.PaytableName,'') = '') Or (ISNULL(r.SkinName,'') = '') Or (ISNULL(r.Denomination,0) = 0)
GROUP BY r.EPSName, r.CurrentDate, r.Amount, r.CashInType
ORDER BY r.EPSName, r.Amount, r.CashInType
End
Else
Begin
/* no missing configuration values on cashin... */
INSERT INTO @res2
SELECT EPSName, Amount, Sum(AmountSum), Sum(CashInCount), CashInType,
MAX(EPSMACAddress), MAX(RTrim(PaytableName)), MAX(RTrim(SkinName)), MAX(Denomination),
MAX(Configuration), MAX(LegalConfigNumber), MAX(Bank), MAX(Zone),
CurrentDate, MIN(ChangeDate), MAX(RemovalDate)
FROM @res
GROUP BY EPSName, CurrentDate, Amount, CashInType
ORDER BY EPSName, Amount, CashInType
End
/* clean up anything still missing configuration values */
UPDATE @res2 set EPSMacAddress='[UNKNOWN]' WHERE (ISNULL(EPSMacAddress,'') = '')
UPDATE @res2 set PaytableName='[UNKNOWN]' WHERE (ISNULL(PaytableName,'') = '')
UPDATE @res2 set SkinName='[UNKNOWN]' WHERE (ISNULL(SkinName,'') = '')
UPDATE @res2 set Denomination=0 WHERE (ISNULL(Denomination,0) = 0)
UPDATE @res2 set Configuration='[UNKNOWN]' WHERE (ISNULL(Configuration,'') = '')
UPDATE @res2 set LegalConfigNumber=99999 WHERE (ISNULL(LegalConfigNumber,0) = 0)
SELECT * from @res2
--------------------------------------
Here is where I am running the query...
:
:
:
dbData = dbRead.ReadDataSet(SQLSelect2, "CashIn", ProcessTimeout);
if (dbData.Tables == null)
{
----- debugger shows it is not ending up here -------
MyLogFile.Warning( "No data returned from CashIn!" );
if (dbRead.Exception == true)
MyLogFile.Error(dbRead.ExceptionMsg);
}
else if (dbData.Tables.Count <= 0)
{
----- debugger shows it is ending up here -------
MyLogFile.Warning( "No data returned from CashIn!" );
if (dbRead.Exception == true)
MyLogFile.Error(dbRead.ExceptionMsg);
}
else if (dbRead.Exception == false)
{
--------- got data so process it ----------
:
:
:
public class DataAccess
{
:
:
:
private string ErrorMessage;
public string ExceptionMsg
{
get
{
string Msg = "Ok";
if (Exception == true)
Msg = ErrorMessage;
Exception = false;
return Msg;
}
}
private bool GotException = false;
public bool Exception
{
set
{
GotException = false;
ErrorMessage = "";
}
get {return GotException;}
}
public DataSet ReadDataSet( string SQLQuery, string dsName, int TimeOut )
{
Exception = false;
dbCommand = new OdbcCommand(SQLQuery, dbConnect);
dbAdapter = new OdbcDataAdapter();
dbData = new DataSet();
dbAdapter.SelectCommand = dbCommand;
---- debugger confirmed that "TimeOut" is 600 here ----
if (TimeOut >= 0)
dbCommand.CommandTimeout = TimeOut;
try
{
dbAdapter.Fill(dbData, dsName);
}
catch (System.Data.Odbc.OdbcException err)
{
---- this is not tripped ----
GotException = true;
ErrorMessage = err.Message.ToString() + ". " + ReadException;
if (LogFileSet==true)
{
MyLog.WriteLine(ErrorMessage);
MyLog.WriteLine( "SQL Query: " );
MyLog.WriteLine( SQLQuery );
}
if (DoingTransaction == true)
Rollback();
}
catch (System.Exception err)
{
--- this is not tripped --------
GotException = true;
ErrorMessage = err.Message.ToString() + ". " + ReadException;
if (LogFileSet==true)
{
MyLog.WriteLine(ErrorMessage);
MyLog.WriteLine( "SQL Query: " );
MyLog.WriteLine( SQLQuery );
}
if (DoingTransaction == true)
Rollback();
}
catch
{
----- this is not tripped ----
GotException = true;
ErrorMessage = ReadException;
if (LogFileSet==true)
{
MyLog.WriteLine(ErrorMessage);
MyLog.WriteLine( "SQL Query: " );
MyLog.WriteLine( SQLQuery );
}
if (DoingTransaction == true)
Rollback();
}
--- it proceeds from the "fill()" command ----
--- directly to here -------
return dbData;
}
:
:
:
}
--------------------------
And here is the snippet from the log...
2005Feb28 151252 STATUS Getting CashIn data...
2005Feb28 151332 WARNING No data returned from CashIn!
2005Feb28 151332 STATUS Getting Play data...
2005Feb28 151336 STATUS Processing Play data...
2005Feb28 151337 STATUS Play records processed: 163
2005Feb28 151337 STATUS Processing CashOut records...
2005Feb28 151337 STATUS CashOut records processed: 1244
|
|
|
|
|
if all that stuff at the top is really contained in SQLSelect2, I'm not surprised it doesn't work. That is a multistep batch combining data schema definition and multiple operations. It is likely the SQlCommand returns after the first operation (which produces no results). The OdbcCommand expecxts only a single sql statement in the commandtext, not a batch of statements.
A more robust way to implement this would be to make it into a stored procedure, and execute the procedure, passing in only the variable parameters. the procedure can contain all this, and will appear as a single statement that returns the result of the final select to the OdbcCommand object.
What is the underlying database engine here? Apparently not SQL server, since you are using the Odbc classes instead of the more efficient SqlClient namespace versions.
Anger is the most impotent of passions. It effects nothing it goes about, and hurts the one who is possessed by it more than the one against whom it is directed.
Carl Sandburg
|
|
|
|
|
1. It IS SQL Server, and I tried to originally use the SqlClient stuff. However, the database connectivity was originally oriented around a VC++ ODBC type of connect string (decision made before I joined the company). The SqlClient connect string did not support certain connectivity options supported by ODBC and so could not connect.
2. The query worked fine before I added the stuff to get the "missing" configuration information. Since the program is released with new features more often than the server/database, then I thought the direct query was better since to convert this to a stored procedure means I also have to implement some way to manage/update the stored procedures, on the fly, separate from the server. I have already had to do this with a report viewer program, and it is quite cumbersome, especially if the administrator login/password gets changed. This is not written for an in-house system, but rather for hundreds of customer sites to query game play data to a comma delimited file for import into separate centralized accounting systems. So, I am constantly changing/updating it to accomodate new requested features, which means the queries tend to change with each release. So, in this case, I would prefer to avoid stored procedures if at all possible.
|
|
|
|
|
After trying everything else of which I could think, I converted it to a stored procedure, and it is still giving me the exact same results. I log what argument values I am passing to the stored procedure, I then cut and paste those values to Query Analyzer to execute the stored procedure, and the procedure runs and gives me over 6000 records. However, when I run the program, it pauses for the same amount of time as QA on the execution of the stored procedure but the DataSet still comes back with an empty table with no exceptions/errors/...
|
|
|
|
|
Ok, I have done some more experimentation. From what I can determine, the longer the wait for data, the less likely it will get anything. It is apparently returning BEFORE it gets data on some queries.
When I do a query for a small bit of data, which it retrieves in < 10 seconds from a fairly small database, it usually gets the data back.
However, if I query against a larger database, which should return over 6000 records in one specific query, it takes about 45 seconds to complete the query and it never gets data. It does not matter whether it is issuing the query above or calling a stored procedure.
I am not getting an error back, such as a query timeout error, because the try/catch handlers do not fire. It is almost as if the "fill()" command has its own independant timeout, separate from the odbccommand timeout.
|
|
|
|
|
Hi,
I wrote a small application console application which executes another program along the way. Is it possible to intergrate the small program into my application and have it execute from there. So i will have only one executable ?
|
|
|
|
|