|
I used Crystal Report 10 for created my report and then i added the report to my project.
I opened the report in V.S.2003 and change it, then i saved it in V.S.2003 too.
V.S.2003 told me that it's Crystal Report version is older than my Crystal Report version, but i saved the changed report in it.
Now when i install the project in a client machine , my report don't work.
My language is V.C#.NET & my project is a windows base.
what can i do ,to solve this problem?
|
|
|
|
|
Hello!
I am trying to create simple window form, and I have
a problem... When I write "using System." at the
beginning of the code, I don't see the namespace
Windows...
Maybe I need to use some DLL's... I just don't
know...
Maybe someone could help me with it?
Thanks in advance!
|
|
|
|
|
Hi there,
You have to ensure that the dll System.Windows.Form.dll is included into ur project.
<< >>
|
|
|
|
|
Where can I check it?
And maybe it is a stupid question, but it is also a .NET Framework dll, right?
Thanks a lot!
|
|
|
|
|
You can check this in the Add Reference dialog....
No stupid question, only stupid answer...
<< >>
|
|
|
|
|
Hi all,
I have datetime field in database. When I am getting records older than
specific date that I passed in parameter I can not get records that
differs only in Time part of the datetime value.
Looks like comparison of Time portion in query failed.
I am using ACCESS database and ADO OleDbCommand. When in debug in Visual Studio QuickWatch clearly can see that the record that am going to get is older than datetime in TimestampParam by 10 sec (for example). If I substract 1 day from the
database field value I am getting the record. It is definetly time
portion comparison failed.
These are some lines from my code to show how I am reading database
OleDbDataAdapter adapter = new OleDbDataAdapter();
myCommand.CommantText = "SELECT [NetLog].* FROM [NetLog] WHERE
Timestamp < TimestampParam"
adapter.SelectCommand = myCommand;
System.Data.DataSet dataSet = new System.Data.DataSet();
int iNumRows = adapter.Fill( dataSet );
I would appreciate any advice
Thanks,
Roman
|
|
|
|
|
Hi,
As you say, it sounds like the time part of DateTime is getting lost somewhere. I am unclear how you are passing this DateTime to your query code; your code snippet uses 'TimestampParam' hardcoded into the query string - what is this? Can you clarify this as I'm trying to reproduce the behaviour.
Regards,
Rob Philpott.
|
|
|
|
|
String myConnectionString = @"Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Data Source=""./data/abel.mdb"";Jet OLEDB:Engine Type=5;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;persist security info=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Global Bulk Transactions=1";
OleDbConnection myConnection = new OleDbConnection(myConnectionString);
OleDbParameter parameter = new OleDbParameter();
parameter.ParameterName = "@TimestampParam";
parameter.Value = DateTime.Now;
OleDbCommand myCommand = new OleDbCommand();
myCommand.Connection = myConnection;
myCommand.CommandText = "SELECT [NetLog].* FROM [NetLog] WHERE Timestamp < @TimestampParam";
myCommand.CommandType = CommandType.Text;
myCommand.Parameters.Add(parameter);
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.SelectCommand = myCommand;
DataSet dataSet = new DataSet();
int iNumRows = adapter.Fill( dataSet );
Get zero rows when records differ only in time portion,
Thanks
|
|
|
|
|
Hi,
I've boshed together a similiar set up - an access mdb with a DateTime column and a text column with test strings in it, and used similiar code to yours (I have used OleDbDataReader rather than OldDbDataAdapter /DataSet ), and for me the time is working correctly. My time part of DateTime is reaching the query.
I notice that your code is missing a line telling the parameter its type:
parameter.OleDbType = OleDbType.Date;
I'm surprised your not getting type mismatch exceptions thrown without this. I'd certainly include that and try again.
If still no luck drop me a line and I'll send you my code through for comparison.
Regards,
Rob Philpott.
|
|
|
|
|
Thank you, Rob
Eventually I fixed that using your clue about types.
|
|
|
|
|
Hi,
I have a textbox and when the text entered is longer than the length of the box, only the end portion that fits within the textbox is shown. How can I make it so that when someone enters a long string and presses Enter, that the beginning portion shows?
Thanks so much!!!
Mel
|
|
|
|
|
Hi,
You can move the displayed text in a text box so that the beginning is visible by setting the SelectionStart property to zero. I'd suggest attaching this code to the LostFocus (Leave) event so that the textbox displays correctly when you tab out of it. Hitting enter is usually reserved the default button.
Regards,
Rob Philpott.
|
|
|
|
|
Perfect. Thanks so much!
Mel
|
|
|
|
|
When i call the AsinSearch Amazon web service, i get the following error
"An unhandled exception of type 'System.NullReferenceException' occurred in SellerSearch.exe
Additional information: Object reference not set to an instance of an object."
I've narrowed it down to the following piece of code:
ProdInfo = Doc.ChildNodes[1]
["ProductInfo"]
["ThirdPartyProductInfo"];
dsInventory.Tables["tblSellerData"].Rows.Clear();
for (Counter = 0; Counter < ProdInfo.ChildNodes.Count; Counter ++)
{
Details = ProdInfo.ChildNodes[Counter];
DR = dsInventory.Tables["tblSellerData"].NewRow();
DR["Asin"] = Details["BrowseName"].InnerText;
//DR["Asin"] = Details["Asin"].InnerText;
//DR["Price"] = Details["ExchangePrice"].InnerText;
//DR["ListingID"] = Details["ExchangeId"];
//DR["ProductName"] = Details["
dsInventory.Tables["tblSellerData"].Rows.Add(DR);
}
}
ProdInfo is an xmlNode.
The XML is coming through just fine. You can see it by putting the following uri in a browser:
http://xml.amazon.com/onca/xml2?t=webservices-20&dev-t=099CQN95JW6909V9T8R2&AsinSearch=B00005JKDR&type=heavy&offer=Used&offerpage=1&f=xml
I'm stuck and can't figure out what the problem is.
any ideas?
Thomas Barker
|
|
|
|
|
Hi Thomas,
Without looking at it too closely, can you not narrow down where the exception occurs by stepping through the code in the debugger. Presumably the error arises from either parsing the xml document or populating the table row.
Regards,
Rob Philpott.
|
|
|
|
|
when the code breaks, it highlights exactly the following line:
ProdInfo = Doc.ChildNodes[1]
["ProductInfo"]
["ThirdPartyProductInfo"];
the problem is that i'm not sure how to fix the problem because it compiles fine. Perhaps it is my incomplete knowledge of how to manipulate xml or even the amazon wsdl correctly. (I started learning C# on monday)
As far as i can tell i've got the xml field names correct and the datagrid field names correct. I also think my nodes are named right. I'm just not experienced enough to figure this one out.
thanks for your help!
Thomas Barker
|
|
|
|
|
Hi Thomas,
It's getting close to my bedtime (beauty sleep and that) but I'll have a look at this in the morning and get back to you. I take it you are loading the whole content into an XmlDocument?
Regards,
Rob Philpott.
|
|
|
|
|
yes. you can see the xml document by just plugging the url i mentioned in the original post into a browser.
thanks for your help.
Thomas Barker
|
|
|
|
|
Hi Thomas,
I meant were you loading the xml content into an object of class System.Xml.XmlDocument? My guess is that you are. (an alternate is to use a class hierarchy built automatically from the wsdl/schema). How are you making the Http request?
I think the problem possibly lies in the way you are navigating the document. This line:
ProdInfo = Doc.ChildNodes[1]["ProductInfo"]["ThirdPartyProductInfo"];
is going to fail because ThirdPartyProductInfo is not a child node of ProductInfo (just looking at the xml in the browser) - it is a child node of Details which is a child node of ProductInfo.
I'd argue that this isn't a good way to go about navigating around an xml document. By chaining indexers together like this, if you get the path wrong in one of them is going to return null, and when you call the next indexer on a null reference you're going to get a NullReferenceException - what I believe is happening presently. It's not clear what part failed.
Instead, you could use XmlDocument.SelectSingleNode passing it an XPath expression for the node you are seeking.
Hope that helps!
Regards,
Rob Philpott.
|
|
|
|
|
I noticed a problem with this program I made. It basically just opens database files using the OleDbDataAdapter, and for some odd reason, it cannot open database files that are outside of its own directory. For example, if the project is in D:\project, and the database file is in D:\project\database.csv. It will work, but on the other hand if the database file is in C:\database.csv, it will not open it. I was wondering if anyone could help me with this.
Here is my code:
<br />
oleDbConnection1.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + dir + @";Extended Properties=""text;HDR=Yes;FMT=Delimited""";<br />
oleDbConnection1.Open();<br />
<br />
|
|
|
|
|
The way to make this work is as follows
string dir = @"C:\database.csv"
or
string dir = @"\\myremotepc\sharefolder\database.csv"
oleDbConnection1.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + dir";Extended Properties=""text;HDR=Yes;FMT=Delimited""";
|
|
|
|
|
Thanks for your reply, it turned out it was whitespace. I had whitespace in my connection string. That is why it was crashing.
Sincerely,
The Major Rager
|
|
|
|
|
I have a Sockets based client using the Async model under C# .NET (i.e. BeginReceive, EndReceive, etc w/ non-blocking socket). I have noticed that under intensive I/O scenarios that the TCP logic (in CLR?) seems to overflowing my buffer. This happens only when I build for release, as you could image when building for debug the extra stack, heap, and instrutions executed tend to mask the problem.
I was wondering if anyone has developed a I/O intensive packet handling hunk of code and what pitfalls, and/or recommendations do you have? Open to suggestions...
Mike
|
|
|
|
|
|
That does not surprise me, when I was using TcpClient I was not please with the level of control I wanted without restoring to lots of translation to the underlying Sockets interface. So... I switched to System.Net.Sockets interface and use the Berkely/Winsock approach. All goes well until heavy load when for some strange reason the BeginReceive() function chokes with a corrupted arg list.
Note, my app uses a 2 stage read. Stage 1 is read the fixed length Message Header which contains the Type and Length of the payload. Stage 2 is read the variable length payload.
I am wondering if I need to do any special initialization to accomodate a data stream that is flinging messages in size from (12 bytes to roughly 6K) at a real time rate proportional to the the number of calls handled per second across a call center with roughly 500 agents, i.e. the firehose I alluded to earlier. Typically we are talking 1.5 to 3 calls per second, plus all sorts of other events such as Agent State changes, Monitors, etc.
Mike
|
|
|
|