That is what I thought. Curious as to why the person who wrote this code would not clean it up. When I put the .Close in the code is there a way to tell if the RecordSet is null?
ie.
If Not...
Type: Posts; User: mojo69
That is what I thought. Curious as to why the person who wrote this code would not clean it up. When I put the .Close in the code is there a way to tell if the RecordSet is null?
ie.
If Not...
Just noticed that RecSet.Close never happens for this operation. Is this a problem? A new Recordset is created each time the function is called.
This is the line where the error occurs.
Set RecSet = Glob.dbAppDB.OpenRecordset(SQLStatement, rstype)
rstype is dbOpenDynaset
SELECT PMTDHDR05.RecordID, PMTDHDR05.RecordTS, PMTDHDR05.RecordCS, PMTDHDR05.OwningID, PMTDHDR05.PaymentType, PMTDHDR05.HDateFlag, PMTDHDR05.NetTot, PMTDHDR05.CmptrNo, PMTDDET05.OwnerID,...
This would have to be done for around 400 tables. Manually changing the field is what drove me to post a question here. Can I do this in C# programmatically?
When Upsizing an Access 2003 databse to SQL Server 2008 how can I set my autonumber fields to convert with Identity Specification set to yes and 1?
To be clear, Access 2007 is installed on the machine and we only use it to make database changes etc. The application is still using the old jet engine.
Also I wish the original developer would...
We have started the process to upgrade the application to .Net. However this process is going to take some time since we are a two person shop and have a learning curve.
We have this application in...
Thanks but I already changed the MaxLocks to 2,000,000 awhile ago. Any other ideas?
Access 2007
Windows Server 2008 R2 Standard Service Pack 1 64 bit
I have a VB6 app using DAO to connect with Access database. The last two days users have been getting Error Code 3035 System Resource Exceeded when doing a simple query. Example: "SELECT * FROM...
Here is the equation:
401.25 / 48171.75
this results in this:
8.32957075464354E-03
how do I get the correct number which is: 120.05420560....
The total number is 28 decimals long. Basically I...
Where can I find an explanation of how C# Apps handle memory when they launch? I think I have a problem with a simple executable that seems to be use more and more memory the longer it runs.
...
I had not copied the new compile version of the .dll created for the class that I was having trouble with.
When I step through my code in the debugger the EventLog entries I am creating appear in the eventlog. When I run executable the eventlog entries for one particular class do not appear, but the...
So...Service1.cs is a passthrough to the BLL? At this 'tier' am I only setting up DataContracts and the corresponding function calls?
I have two classes (Service1.cs and IService1.cs) in a WCF project.
Do I think of these as the Business Logic Layer or only as a passthrough to access the BLL, DLL, etc.? Also I think that there...
closing up
Or is this a better way to do this?
public string ValidUser(string connString, string User, string Pass)
{
OleDbConnection oleConn = new...
I have this code I would like to change to a parameterized query.
public String GetLoginRecordID(String User, String Password, String result,String connString)
{
...
I am looping through around 500,000 records to compile a report in a nightly 'batch' process. In the old Visual Basic 6 app this process took less than 3 minutes. However I was finding that the C#...
This is an automated process that will be happening over night. If an error occurs I just want to exit the process cleanly, log the message and eventually send an email to myself. I don't control how...
I am pulling a starting date out of a table in the database. The field is a text field in an Access DB. I created a function to validate the date.
public bool IsDate(String testDate)
...
Sometimes the obvious can elude me.........
And yes, I am familiar with F1.
While I duly appreciate your reponse, as a beginner in C# what in the error message could I have keyed on to find the answer? I took the error message and googled it and got back garbage. I realize...
For the FilterExpression on the DataTable.Select method can I have more than one filter. Like this:
String expression = "[ProductID] = '" + PMTDProductID + "' && [CustNo] =...
The code I posted is what is working for me right now. I will keep looking for better ways, including your example. The data will be used afterward. I started another thread to handle that. I...
var results = from myRow in dt.AsEnumerable()
where myRow.Field<string>("ProductID") == PMTDProductID && myRow.Field<string>("CustNo") == APMFCustNo
...
var results = from myRow in dt.AsEnumerable()
where myRow.Field<string>("ProductID") == PMTDProductID && myRow.Field<string>("CustNo") == APMFCustNo
...
Changed my code to use the Find method for the List<T>;
YPUR yFind = _ypur.Find(delegate(YPUR yr)
{
return yr.ProductID ==...
I would like to use LINQ to count how many times there is a match in a List<T>. The count need to tell me how may times that a productid and customerid exist in the List<T>. I have this code that I...
Going to blame this on the IDE unless I hear different.
The message I posted to start off is the message.
I added this for a test and it shows me the value when I hover now. Does the message show up because I have not 'used' the variable yet? Is this...
It says they don't exist when I hover over the variable as I am stepping through the code. Also when I try to print it in the Immediate window. I provided the MonthDate function so that it could be...
public bool ProcessPMTDRecords(BackgroundWorker bw)
{
//process pmtdhdr/det records into an array
bw.ReportProgress(0, "Processing");
...
When I hover over the YTD1Month part of the line of code after it executes I do not see what the value is. I added a watch to the variable and it is telling me:
The name 'YTD1Month' does not exist...
I have seen some information about structs. Can you create an struct array?
private struct YPUR
{
private string CustNum;
private string CustName;
...
In Visual Basic 6 you can set up a user defined type and declare an array as that type. How does this get accomplished in C#? Do I create a dataset to hold the values I need? ArrayList?
Type...
When I run this query in Access it returns all the rows in table.
SELECT * FROM Table WHERE RecordID ^ -1;