Click here to Skip to main content
15,310,348 members

Comments by PhilLenoir (Top 183 by date)

PhilLenoir 30-Jan-15 12:46pm View
   
Using count with a field name excludes records where that field is null. this is great if it's the behaviour you want. Using COUNT(*) returns a count including records with null values, but it is slow on large data sets. IMO the best practice for count is COUNT(1).
PhilLenoir 20-Nov-14 15:37pm View
   
If your DBMS/connection capability doesn't allow you to set a time-out but you are working in a multi-thread tool you could fire the query on a thread and kill the thread if it does not return in time.

You don't say what your DBMS is or what your programming toolset is.
PhilLenoir 6-Nov-14 14:58pm View
   
Gert, BCP can't see "inserted". BCP establishes a new connection to SQL and the context of the trigger or anything it calls is not available to BCP and BCP cannot be transactional with the trigger.

If you were to insert into another table or have a field "logged" in the table concerned you could then either use BCP to log the contents of that other table (possibly cleaning it up as you go) or have BCP call a stored procedure that selects the data to be logged and cleans up within a transaction.
PhilLenoir 6-Nov-14 14:48pm View
   
That's what I was getting at with the log table. Bulk copy will only see anything that's got a global context. You can pass dynamic SQL but not dynamic data. If Gert uses a global construct he needs to make sure that he doesn't have a concurrency issue. The call to xp_cmdshell is synchronous, but the write/reads to a global structure would not be. He could generate a key and pass that to BCP using a dynamic query to remove any possibility of collisions ... or use CLR (possibly the most straightforward solution).. There's not enough detail in the question to post a definitive solution (yet), although these comments might give him all the push he needs.
PhilLenoir 6-Nov-14 14:35pm View
   
No problem. If you are still stuck, see if you can make out the sense of the "selector key" questions I posed and feel free to ask for more help.
PhilLenoir 6-Nov-14 14:19pm View
   
Thanks Maciej, and a generous glass of Wisniowka to you!
PhilLenoir 6-Nov-14 11:32am View
   
BCP will not work in this way as "inserted" only has meaning within the confines of the trigger.

You could use CLR to write to the file system or use a log table as a vehicle for BCP, possibly clearing the log after the shell call returns (although you need to guard against concurrency issues).

Temporary tables will not work either as they will also be unavailable to BCP.
PhilLenoir 6-Nov-14 10:15am View
   
I appreciate that language is a barrier here, but you are still not clear. Let's look a one record, in your answer 1 we have:
TT.0161110 Acc-Gha 16
Why should this record be present as all TT.0161110 records appear to be present and the same in both tables?

There must be some (simple?) logic at play here. Let's try to deconstruct:
"Show me all records in table 2 that are not present in table 1" is this correct? if this is not correct then what is the logic of the row set to be produced?
Now, how do we tell if a record is present in table 2 that is in table 1:
ProjectNr and ProjectName appear to be redundant, let's assume that's true, so ProjectNr is one of our "selectors". Booking Nr also appears to be redundant as the BookingNr is the same whenever the ProjectNr is the same? Finance looks a little more promising although there are duplicates for a given ProjectNr (e.g. LU). If we include Price A we seem to be unique, so our "candidate key" (= record selector) appears to be ProjectNr, Finance and Price A, meaning that any records in table 2 that have a combination of values in these fields that are not present in table 1 should be in our result set. Is this true or do more fields need to be thrown into the mix? Are the assumptions correct about redundancy (do they apply to all your data?)
Finally what attributes do we need displayed in our result set.

If you do change your question, please use the formatting tools to make it easier for us to read.
PhilLenoir 6-Nov-14 8:55am View
   
:)
PhilLenoir 5-Nov-14 15:13pm View
   
Let me try to explain again what the challenges are:

Your selection "key" appears to be a compound of ProjectNr and ProjectName. However, these are not keys on either table (there are multiple rows having the same values for these fields with differing attributes). What are the Primary Keys on these two tables? If the two tables are "heaps" (no Primary Key), I don't see how you can do a row by row comparison; you will get a Cartesian product across any attempt to relate the tables (e.g. 4 rows for AD.300 Ber-Port or 4 ways I can compare these rows, 1A to 1A, 1A to 2B, 1B to 2A and 1B to 2B). If this is correct, unless the rows are duplicates (and presumably redundant), there will always be differences.

Next, the code fragment you display does not give the result you've shown for the table examples you gave.

Finally, It may be me being dense, but your explanation doesn't give a concrete mathematical description of the result you want. This might be OK if you illustrated with an example that makes sense, but I can't easily see how you get from your tables to your "expected" results.

My suggestions are:
Explain your schema (what are the keys).
Explain what information you want output from EACH table subject to which conditions.
Give example inputs and outputs that you have checked carefully.

One last comment: Reply to the person asking the question. If you don't do that, the person receives no notification.

Good luck!
PhilLenoir 5-Nov-14 12:28pm View
   
I'm having a few problems understanding your exact requirement as none of your code (filtered on Area D), your explanation or your example exactly match.

I get that you want a row set that only shows the differing records including their details but:

Do you only want the differing column values shown (blank where there is no difference) or all of the columns for each differing row?
Do you want to filter by Area D?

These both affect the complexity of the solution.
PhilLenoir 4-Nov-14 9:47am View
   
Why would you? The correct relational model for this is probably two tables (Exams and Questions, linked on exam ID). You can write a T-SQL function to extract the question in a concatenated format if this is a functional requirement, but it's not a good way to store the data.
PhilLenoir 3-Nov-14 14:20pm View
   
How is row1 defined in relation to row2, row3 to row4 etc.? If you can define that relationship, as SQL Server passes the ACID test, you just need an update query with the appropriate FROM clause.
PhilLenoir 31-Oct-14 10:20am View
   
This is not a code giveaway facility, this is a programmers forum for asking questions when stuck. If you have made some attempt to solve this yourself please use the "Improve question" function, add the code that you have tried, tell us your schema and where you are stuck. We're here to help you and provide pointers for you to help yourself, not do your work for you.
PhilLenoir 30-Oct-14 9:05am View
   
What's the question? Dumping a load of unformatted code at us with a half baked question as the title will get you exactly zero help. Please either remove the question or tell us what your problem is, format the code and remove the irrelevant bits.
PhilLenoir 29-Oct-14 8:42am View
   
What do you mean by layering?

If you mean layering in the user interface, classic ASP, much like ASPX uses additional tags on HTML which are rendered by the server. You can use divs, position and z-order just as you can on any other page. The ASP IISAPI filter will not touch those tags.
PhilLenoir 28-Oct-14 12:10pm View
   
Thanks Maciej
PhilLenoir 24-Oct-14 12:36pm View
   
Is it possibly because you do not have "@Name" declared (only @Tax - unused and @address) that you're having a problem?
PhilLenoir 24-Oct-14 11:08am View
   
I spoke too soon. On thinking about it, there was a bug when the current day date is greater then the number of days in the next month. I've amended the solution to use the 1st if the month to calculate the number of days in the month.

My apologies - it really MUST be Friday!
PhilLenoir 24-Oct-14 10:41am View
   
No problem. It must be Friday or I'd have thought of the T-SQL sooner!
PhilLenoir 24-Oct-14 10:20am View
   
I've just thought of a simple way using T-SQL - see modified solution.
PhilLenoir 24-Oct-14 10:13am View
   
Create your CLR function in VS using a "Database" template.

The DateTime.DaysInMonth function takes a year and month and returns the number of days, taking into account leap years. If the date of the Sunday (or any other day) is GREATER THEN the number of days in the month less 7 then it's the last of that day in the month.

PhilLenoir 24-Oct-14 9:54am View
   
You can call a CLR function from a stored proc or any T-SQL! Is CLR enabled on your server?
PhilLenoir 24-Oct-14 9:47am View
   
The easiest way to do this is a CLR function using DateTime.DaysInMonth. How are your .NET skills?
PhilLenoir 24-Oct-14 9:44am View
   
Which version of SQL Server are you using. 12 has a function "EOMONTH" that can be used in the searched CASE.
PhilLenoir 24-Oct-14 9:26am View
   
If there are multiple values in your join for each row in the table to be updated there can only be one value (you are updating a single row). If there is some predicate that would select a single row then that must be present in the WHERE clause so that only a single row is returned.

If there should not be multiple rows then you have an error in your join.

If you need additional rows created, then an UPDATE statement won't do and you should try looking at a MERGE query. As per previous comments, we'd need to know more about your schema (and possibly data) to help.

One final comment: If a select will give you your data do you need to store the data. Storing derived data is almost always unnecessary and can cause problems.
PhilLenoir 23-Oct-14 14:50pm View
   
I think this is more suited to the lounge, especially as their really isn't a solution to the question - it's mostly opinion! I suggest that you approach the choices in a similar way to solving any problem:
What do you enjoy?
What career path do you want realistically follow?
What demand is there for the various skill sets in your region and with your level of education?

Most (all) programmers have to be comfortable programming in multiple languages. Sometimes using a specific language for a single project. We all develop preferences and our value (and usually our remuneration) varies according to the our expertise and the relative demand in/for specific technologies. Work for a software house and you'll possibly need to use all of the above, and others. If you are self-employed you might choose to specialize in a narrow band (certainly at first). The most important thing is to learn and understand the principles of programming as most programming languages share the same concepts and primitive constructs, just with different syntax.
PhilLenoir 23-Oct-14 14:37pm View
   
There is almost certainly a bug in your switch statement for cases 0 - 9 as the value 0 is not equal to '0' etc.. Without knowing exactly what your control codes are meant to do, you could almost certainly replace the switch with:
If (I==10){
Glcd_Clear();
}
else{
Glcd_Write_Char(i,a,b,1);
}
PhilLenoir 23-Oct-14 14:04pm View
   
Have you checked to see if the registration failed. It could be that a dependency is missing from the setup for the component that is present on many of the machines (so registration works on some but not others). Try manually registering the DLL using regsrv32 on a machine where things are failing. You should get a more meaningful error message which may help you identify the problem (missing dependency etc.).
PhilLenoir 20-Oct-14 15:48pm View
   
A stored procedure would be on the back-end, not in Access.

Linked tables are easily re-linked in code if that's the issue.

If things are really that dynamic, how are you building and running the query? It has to be as easy to use ADO as what you are trying to do. In short, which query parser do you want to do the heavy lifting. If you want Jet (Access) then use linked tables, relinking if necessary; if SS then use ADO, you can then use dynamic configuration to adjust your connection or query.
PhilLenoir 20-Oct-14 15:38pm View
   
Frans, what's not clear to me is why are you using Access to work with SQL Server in this way. My normal approach would be to use linked tables from Access to SQL Server and work with the tables as if they were local. You will find that for most purposes, the queries will run faster and the syntax much simpler.

Alternately, you could use ADO within VB code to shift all query processing to the backend (possibly using stored procedures). Using a hybrid of Access and SQL Server query languages makes for hard work!
PhilLenoir 10-Oct-14 11:11am View
   
You don't say what partitions your running sum and you give us a sample output without giving us your source data.

This looks like it might be a candidate for a Table Valued Function and probably a CLR one at that. With a T-SQL TVF you would have to run a cursor, but with remembering the highest value and continually doing compares, I'd be inclined to go the CLR route.
PhilLenoir 10-Oct-14 10:05am View
   
Your schema makes no sense to me. How do tbl_advisorcommissions and tbl_extra_advisorcommissions relate tbl_user_registration or tbl_weeklyCommissions?
It would help immensely when you pose a question if you format your code with indents and line breaks.

A cross join returns no rows when one side has no rows (a cross join is a straightforward Cartesian product of the number of rows in each joined row set and 0 x n is always 0).

Please note that there is redundancy in the expressions where you are summing commission amount; your case and you coalesce are doing exactly the same thing and could be replaced by the simpler "IsNull(SUM(commission_amount),0)"
PhilLenoir 9-Oct-14 17:15pm View
   
You need to look at your notes for a definition of "ft", it's not a standard notation as far as I now (frequency times time?) The other terms:
s(t) = a function of time (s is used as shorthand to sine)
A = some amplitude (a constant or user input?)
ft (see above). If it is frequency x time, you need to get frequency from somewhere (a constant or user input). t would be your x-axis variable.
Phi = an angle (could this be phase shift?) Again, where are you getting this from.

The coordinates that you plot are s(t), say s_of_t and t.

Short of actually doing your assignment for you, I think you have plenty of pointers. Why don't you collaborate with one of your classmates?
PhilLenoir 9-Oct-14 16:34pm View
   
Really?

How about:
http://www.c-sharpcorner.com/uploadfile/TheButler/graphics-and-C-Sharp/
http://www.techotopia.com/index.php/Drawing_Graphics_in_C_Sharp
https://www.daniweb.com/software-development/csharp/code/217204/function-plotting-in-c
PhilLenoir 9-Oct-14 16:21pm View
   
How about you have a stab at it and post question where you get stuck?
PhilLenoir 9-Oct-14 15:36pm View
   
No prob!
PhilLenoir 9-Oct-14 14:33pm View
   
If you missed it, I edited the solution, the initial submission missed a line of code. Also, the quotes around the proc name got dropped when I encoded the block.
PhilLenoir 9-Oct-14 11:34am View
   
Please improve your question. Please remember that we can't see your code (unless you post it) and we can't read your mind.

Last record in what?
A web page is a concurrent medium, multiple users can see the web page at the same time. It's not generally a good idea to set an ID until data is committed. Could multiple users end up using the same ID? Does this matter for your purpose?
PhilLenoir 8-Oct-14 16:36pm View
   
CP keeps encoding this, I have to tweak it to correct that encoding ...
It looks good now!
PhilLenoir 8-Oct-14 16:11pm View
   
You are, of course, referring to VBScript on the server, not the client. Is there a reason that you want to do this in ASP and not ASP.Net? It is simpler to do in ASP.Net.
PhilLenoir 8-Oct-14 12:49pm View
   
LOL
PhilLenoir 8-Oct-14 12:32pm View
   
I know (on both counts), I didn't want to dissuade you if you could see something I couldn't!
PhilLenoir 8-Oct-14 12:17pm View
   
Removing "Top 1" will avoid SS from creating a temporary index, so it should run faster (although I'm not sure how much!) If you can see a way to make this slicker with a CTE, all power to you (I'm not seeing it! :))

My point about the CTE was simply that with a good model and a recursive join, you could find a full reporting line (for instance). Good modelling supports functionality not even imagined at design time, which is why I distrust function driven design for a database (except for scoping).

In my shop, I want a REALLY good reason for not conforming to 3rd Normal, and those are rare!
PhilLenoir 8-Oct-14 11:52am View
   
Maciej, the poster says that he cannot change the table structure, so I did not attempt a critique. In my view a correct model would look more like an user table, a role lookup table and a link table that models relationships between users (user ID, related ID and role ID). Such a structure would allow for a pivot query and possibly "path" type queries using CTEs. Given the constraint that the model can't be changed and the lack of detail on the current model, I believe the solution works! :)
PhilLenoir 8-Oct-14 9:45am View
   
Good point Richard!
PhilLenoir 7-Oct-14 14:42pm View
   
No problem. It's good to show newbies a reflexive join anyway.
PhilLenoir 7-Oct-14 14:21pm View
   
You know that you don't need the join back to itself (unless you were copying one row's data to another), at least in an ACID DBMS? The results are the same for both solutions in, say, SQL Server! I guess that there may be a DBMS where you need the join. :)
PhilLenoir 7-Oct-14 8:59am View
   
Have you tried looking at your network itself? Could you have a noisy card or port? Are any other network accesses occasionally slow? CPU/memory on both client and server?

You could try a packet sniffer (on both client and server).
PhilLenoir 1-Oct-14 16:02pm View
   
What is going to render your superscript? A browser? an email tool (which format HTML or RTF)? Some other RTF renderer? Something else?
PhilLenoir 1-Oct-14 15:57pm View
   
Same server? Do you need to replicate data or just make it available? Is it a bulk operation or driven by some business process?
PhilLenoir 29-Sep-14 12:26pm View
   
1) you are using the same variable (con) for both the reader and the delete command object, but you are attempting to open it and close it twice.
2) you should parameterize your query and not build the string
3) you could do what you are displaying with a single SQL statement
4) you don't indicate what "it's not working" means: error message? (where's your try/catch block?) no error - result versus expected?
PhilLenoir 26-Sep-14 11:07am View
   
It looks to me to be a server name problem. You could try:
Is there a typo in the server name or is the reference complete?
Pinging the server name - this should confirm the DNS issue.
Using the IP address of the server instead of the name - not best practice as the server name might stay the same and the IP change.
Adding an entry to your Hosts file.
PhilLenoir 26-Sep-14 10:03am View
   
... then create a new stored proc, call the "fixed stored proc from that, declare a temp table, and push your result into that.
PhilLenoir 25-Sep-14 16:47pm View
   
My bad, I didn't spot that you were returning a reference. I'd never use a Using block in this case, so I'm not certain that the returned object would be valid. You can easily test this yourself by checking the object in the calling code.
PhilLenoir 25-Sep-14 9:36am View
   
There are many instances where subqueries are used. I suggest that you do some web searches, but I'll give you one instance where one must be used: A Delete query when comparing two data sets.
DELETE FROM Table1 WHERE ID NOT IN (SELECT ID FROM Table2)
PhilLenoir 25-Sep-14 9:06am View
   
How are you printing it now?
PhilLenoir 25-Sep-14 8:53am View
   
Why, what's the issue?
PhilLenoir 24-Sep-14 17:33pm View
   
Too obvious! :)
PhilLenoir 24-Sep-14 15:56pm View
   
No, not directly, but metadata is usually stored in alternate "streams" on the file. Multiple stream files are a not well publicized feature of Windows file systems. I'd do some research in that direction.
PhilLenoir 24-Sep-14 13:54pm View
   
Your question isn't clear. If you want to move a SQL database, detach the database, copy the MDF and LDF files and attach on the new computer. Do a web search on Detach SQL Server
PhilLenoir 24-Sep-14 12:13pm View
   
What process? Please remember that we don't see your problem, only what you tell us. Selecting records where field IS NULL is the way to detect null values. If the data is not valid where the fields are null, make the field definitions "not null" and the data can never be created.
PhilLenoir 24-Sep-14 9:17am View
   
I've added a third solution using a scalar function
PhilLenoir 24-Sep-14 8:58am View
   
I don't see the logic for user ID 1 being its own manager. This is a problem for the recursion as it causes an infinite loop. Surely user 1 has no manager?
PhilLenoir 23-Sep-14 9:59am View
   
My friend, you still did not provide your sample data and the results. My original query worked for my test data, but I think that I was not using the "active" field the way that you are. I've changed my sample data so that I think it now matches yours and amended the query accordingly by adding a single level of recursion to the "anchor" query (the first query in the UNION. Hopefully this works. If you provide more information, it makes it easier to help you. Both solutions work for the only sample you provided.
PhilLenoir 23-Sep-14 9:17am View
   
Hmm, it's looks like we have the answer! :)
PhilLenoir 23-Sep-14 9:16am View
   
The obvious answer is that you don't have enough free memory. Use a performance monitor (Task Manager will do) as you run the code and look at memory usage.

However an old Windows error reporting issue may be at play here. Out of Memory is error zero. If a library didn't implement error handling properly and set the error number Windows would report the error as Out of Memory. This may or may not be the case here. If your memory usage does not exceed the resources, start looking for other problems. Is the file locked? What is the format of the file? Try a file of a different format of the same size ...
PhilLenoir 23-Sep-14 9:10am View
   
Try running in debug, get the values you are passing and run the query in SQL Management Studio to debug. Best guess, there are no rows being returned, but without seeing your stored proc .....
PhilLenoir 23-Sep-14 9:06am View
   
A) I thought that you wanted active managers, not inactive?
B) I tested the query on some sample data that I created
C) At some point you have to start understanding this stuff and figuring out things for yourself. The purpose of this board is to help those who are stuck, not for us to provide free consulting services.
D) You have not provided enough information at any step. Your first question posting required us to guess what you wanted. The first solution I provided solved the problem you posted, you didn't mention multiple levels. Now you haven't provided the sample data, the output that the query produced and how that differs from what you want.

When you request help here, you need to help us to help you. Explain conceptually what you need, ideally give an exact example, tell us what you tried and how the results were not as expected.

I'm willing to continue to help, but I'm not going to guess at what it is you are stuck on.
PhilLenoir 22-Sep-14 10:01am View
   
Please give examples of your query. Have you considered using a stored procedure for the query? The symptoms sound like a query plan being cached and then dropped for a complex query. With a stored procedure the query plan will be held in cache more reliably than an ad hoc query. You can also read up on query hints to short circuit some plan decisions and SQL query performance troubleshooting. A rule of thumb: the more indexes you have, the faster the reads and the slower the writes. Index all fields where you are filtering or joining and use transactions if this affects batch writes.
PhilLenoir 22-Sep-14 9:28am View
   
Why are you using ODBC and not native SQL objects (SQLConnection, SQLCommand,...)
PhilLenoir 22-Sep-14 8:49am View
   
Please read up on recursive Common Table Expressions. I don't have time right now to fill in more detail. Use exactly the same principles as in the solution for your join: http://technet.microsoft.com/en-us/library/ms186243(v=SQL.105).aspx
PhilLenoir 19-Sep-14 12:13pm View
   
Why do you need an ORDER BY in the inner subquery? The "IN" doesn't care which order the results are presented in.
PhilLenoir 19-Sep-14 9:56am View
   
My apologies, I seem to be asleep this morning! Both cases were "WHEN 0"!
PhilLenoir 19-Sep-14 9:02am View
   
How are you setting up your dataset? The SelectCommand of your dataset should be:
EXEC rpt_detail_statement @ZIDNO, @ZLOANNUMBER, @ZINT_CODE
With select parameters: ZIDNO, ZLOANNUMBER and ZINT_CODE which you'll have to supply values for.
PhilLenoir 19-Sep-14 8:50am View
   
Please clarify your question. Above 3 or above third? What field are we talking about? Are you saying that user_ids 1 and 3 should be active, but not 2? or the manager_id field? Above 3 and all the rest should be inactive? greater than or equal to 3? What about 1?
If the value of the "active" field can be derived from another, you should not be storing it but be deriving it dynamically.
PhilLenoir 5-Sep-14 11:58am View
   
What code are you using to assign the value to your varable "Description"? Something is escaping the double quote. I don't have time to research this for you until I'm back over a week away. In the meantime, I suggest the following:
Try to find out where the escape (\") is coming from - use debug to inspect your variable and where you variable comes from (e.g. the data reader in your fragment). BTW, you don't need "Convert.ToString" if already a string. Try tou understand why this is happening and your solution should present itself.

A quick and dirty fix is to replace the offending escape sequence in the query. I strongly advocate finding the real cause and fixing the problem, but if you are under time pressure you can change the query to:
SELECT Code FROM Products WHERE Description = REPLACE(@Description, CHAR(92)+CHAR(34), CHAR(34))
Using the ascii codes wil certainly circumvent any escape sequence issues.
PhilLenoir 5-Sep-14 11:00am View
   
It should. Can you give the exact line of code that you are using and a sample of the data causing an issue. What happens (error message, results not returned, ...), i.e., what does "not working" mean. I'm only here for another hour and I'm on vacation next week ....
PhilLenoir 5-Sep-14 9:40am View
   
The second of the two does so?
PhilLenoir 4-Sep-14 15:46pm View
   
Did you try the add with value, you should be able to use a blank string.
PhilLenoir 4-Sep-14 15:34pm View
   
OK, I see the issues:
1) You're using MySQL, not SQL Server, so the members are probably somewhat different
2) We may have different version of VS anyway

If you add the parameter with value (similar to the first parameter, you should still be able to change its value in the loop. I don't have MySQL or the libraries, so I can't test it thoroughly and the on-line documentation I had time to look at seems sketchy.
PhilLenoir 4-Sep-14 14:43pm View
   
Reliable, yes! Efficient: Efficiency goes up as file size goes up. Myself, I wouldn't use it for files smaller than 100MB, although there are plenty out there that do and swear by it. We have large and fast servers and storage here and I find that I'm perfectly happy with varbinary(MAX) for our typical needs where file size rarely exceeds 20MB. Where we have really large data, it's mostly spatial or time series for which we have specialized storage solutions.
PhilLenoir 4-Sep-14 14:14pm View
   
From your screenshot I can see that you are using a class "MySQLCommand" as opposed to "SQLCommand", so I can't be certain of what changes you may have made.

What error is the compiler giving you? What is the column type in your schema?

To be safe, uou need to match the column type with the parameter type. Is it a char, nchar, nvarchar?

I have this code working using a SQLCommand object (with my own field names, of course), with no compile or run time errors.
PhilLenoir 4-Sep-14 9:34am View
   
What is your data - give an example of the data that is being truncated.
What is the data type in SQL Server, char or varchar?
If the field is a char then it will be padded with spaces if actually shorter than 7.
What is the type of the recordset (DAO or ADO)? Access is often "helpful" and trims trailing spaces.
Did you check the value of strInvoice in debug? Use:
? "|" & strInvoice & "|"
to see if there are any leading or trailing spaces fetched into the variable; compare that to the original value (in SQL Server using SQL Management Studio, not Access)
PhilLenoir 4-Sep-14 9:21am View
   
Almost impossible to answer:
Is it on its own server (best approach)? If not, is something else hogging CPU, memory?
If it's on a VM, can you allocate more resources to the VM?
Give it more memory, SQL can pretty much use every byte you can throw at it
Do you have a maintenance plan on it and its databases (backup/truncate)?
Are its disks fragmented?
300 rows out of how many? Is the record source indexed, contain lots of joins? - read up on optimizing queries and using SQL Server performance tools to consider adding indexes. As a rule of thumb, all fields that you filter or join on should be indexed (which will slow down writes but spead up reads - if write performance becomes an issue, you can use transactions to delay indexing).

You can help yourself by looking at Task Manager or perfmon to see if it is CPU or I/O bound.
PhilLenoir 3-Sep-14 16:14pm View
   
The naming is a little confusing, especially as we don't see your XHTML (which control each validator is bound to). In your question to use "Textbox1" and "Textbox2". Your actual textbox controls are called "TextBoxLYTNFUGn" and your validators are named "RangeValidatorLYTNFUGn". If n is 1 and RangeValidatorLYTNFUG1 is bound to TextBoxLYTNFUG1 then I think you have something wrong (You are binding to the control you are deriving the range from - is the user going to edit these values?).

Have you tried your code? If yes, how is it behaving that doesn't meet expectations?

Please use the improve question function to add some detail.
PhilLenoir 3-Sep-14 14:18pm View
   
Why are you casting your dates as varchars? What is the data type of the database fields? Comparisions between datestrings are tricky, abstract date/time types are far more reliable.

Are you sure that you are not passing blank strings for the dates? You also have potential issues with Month/Day ordering for date validity.
PhilLenoir 3-Sep-14 14:11pm View
   
Are you sure that the browser service is running? Do you definitely have a network route to that server (you could try pinging it?) To populate the list, the application sends out a UDP broadcast and all servers on that network should respond.

One diagnostic you could try is to create a blank Access database. Under external data, choose an ODBC import. Select one of the SQL Server drivers (I usually use the original one instead of Native Client 10 as I've had problems occasionally and the original one is OK for this exercise) You should then see your server in that list. If not, then either your UDP packets aren't hitting that server or the browser process just isn't listening!
PhilLenoir 3-Sep-14 11:47am View
   
You are welcome!

You could probably move these functions into property methods of the structure, but the approach looks sound. LSET was pretty much the only way of doing memory overlays in VB6 without using Windows API calls. I know that it's there in VB.NET, but it's not the same as the VB6 operator. Again, it has been a while since I've had to do bit stuffing etc.!

My first VB project (VB3) was to build a microcontroller simulator for testing our real C production code (the embedded systems were behind schedule and we wanted to test our hardware register access).

Good luck!
PhilLenoir 3-Sep-14 11:14am View
   
I can see you're a C programmer. I'm an ex real-time C and Ada guy myself!

Part of our aim here is to help you learn, rather than just give quick answers.

Your approach is fine as far as it goes, but It's hard to write expressive code with this approach. OO would also make it easier to use intelligent behaviour. I see the "Packed" field. How had you planned to use this and to pack/unpack? I've not used it in years, but you may want to look at the LSET operator. I've used this to mimic C Unions in the past.

I've not used Structure definitions in VB.NET, but my understanding is that they are really classes under the hood (they certainly look a lot like it!) So if you are going down that route I'm of limited use to you. I think that you can use property methods to access and validate the members of your structure (much like a class), but you'll need to research that yourself.

You certainly seem to have a handle on a working approach. Feel free to message with any specific problems you're having and I'll help if I can.
PhilLenoir 3-Sep-14 9:07am View
   
We can't help you with a query without knowing your schema. I suggest reading any standard on-line help for SQL SELECT query syntax.
PhilLenoir 3-Sep-14 9:03am View
   
From a quick glance I can't see a problem per se. The question is, "What do you expect and what happens that you don't?" We can't tell from code what the problem is, you have to give us a clue! :)
I would make the following comments:
I suspect that the returned results might be difficult to use as the field names vary: I'd suggest aliasing the variant column names to shared names for all results. Also, CompanyInfo looks suspiciously unnormalized. If this is beyond your control or deliberate, that's what you have to deal with, but if not, I suggest you normalize to 3rd normal form. With the right relationships and possibly a link entity you could probably get your results from appropriate joins.
PhilLenoir 2-Sep-14 14:12pm View
   
What were you expecting versus what did you get? A debugger is not going to help you here!
PhilLenoir 2-Sep-14 10:44am View
   
Please show the schema of your tables.
PhilLenoir 2-Sep-14 10:31am View
   
There are plenty of articles on the web: look at http://blog.pluralsight.com/iis7-redirect-windows-server-2008.
PhilLenoir 2-Sep-14 9:25am View
   
Sorry, there was a typo, the joins should have been "LEFT OUTER" not "LEFT INNER"; there's no such thing as a "LEFT INNER" join!

PhilLenoir 28-Aug-14 14:10pm View
   
You should implement a try/catch block to catch the exception. If you're running in debug, you should see the line that causes the error. If it's at run-time, the error display should show the line number. Turn on line numbers and you should be able to tell exactly what the problem is.
PhilLenoir 28-Aug-14 12:02pm View
   
Thanks Nelek, I keep forgetting to use the code formatting option!
PhilLenoir 28-Aug-14 10:02am View
   
Where is the query being run? The stucture of your query is a little odd, but it works (although you will get a negative number from your DATEDIFF!) Is EDATA a table or is it a SQL View? Somehow your query processor is treating TDATE as a string.
PhilLenoir 28-Aug-14 9:47am View
   
What is your data type of TDate and do you have an example of a value causing the error?
PhilLenoir 28-Aug-14 9:25am View
   
I would read up on position attributes (static/absolute/relative). here are a couple of good explanations:
http://www.barelyfitz.com/screencast/html-training/css/positioning/
http://designshack.net/articles/css/the-lowdown-on-absolute-vs-relative-positioning/

When you REALLY understand these things, you're off to the races!
PhilLenoir 28-Aug-14 9:08am View
   
Great!
PhilLenoir 28-Aug-14 9:07am View
   
Well spotted that man!
PhilLenoir 27-Aug-14 17:07pm View
   
Luki, clearly something is working correctly. When the row is removed for the list, is that you refreshing the list from the database or do you remove it directly. Is it possible that the list is being populated from one query and refreshed from another? Here are some debugging suggestions:
> Run the queries you have manually directly on the backend (SQL Management Studio). Hard code in the dynamic values that you are using for testing.
> Add another record in the table to show multiple rows. Click the new record in your application. Do both rows now disappear?
> Check the contents of your "viewed" table before and after you run the test and re-run your manual queries.

If the query works, then the problem is something else (they don't work sometimes and not others!) :)
PhilLenoir 27-Aug-14 16:33pm View
   
LOL
PhilLenoir 27-Aug-14 16:17pm View
   
Problems? (It looks like you unaccepted the solution)
PhilLenoir 27-Aug-14 16:15pm View
   
Andrei Gourianov (GoScreen) still uses them and he handles his own registrations. It might be worth contacting him for how he does that. I've always found him to be a good guy: http://goscreen.info/
PhilLenoir 27-Aug-14 15:56pm View
   
You are very welcome!
PhilLenoir 27-Aug-14 14:48pm View
   
Have you tried executing the SP on SQL Server itself? What account is being used by your application and what privileges have you assigned?
PhilLenoir 27-Aug-14 12:09pm View
   
You don't say which CPU, client application or database server? Have you checked which process is CPU bound?
PhilLenoir 27-Aug-14 9:36am View
   
The MS provided method for building multi-lingual applications in VB6 is using resource files, although I've also used database tables to drive multi-lingual interfaces. This only solves the application itself, not any dynamic data. Translating using software is high risk, there are plenty of examples on the web of using translation software to translate both ways and coming up with hillarious results. Translation software may be getting better, but I don't believe that it's there yet! I've always paid a professional translator to deliver my translations and had a "friendly" native speaker review for any gotchas. This could only apply to dynamic data if the data is made up of stock phrases unless, of course, the translation was on-going and after the fact (economically dubious!)

Google or other may offer a web service for translation on the fly, but I'm not going to research that for you; and, as I mentioned, I'm not convinced that you'll get high quality translations.

Good luck!
PhilLenoir 27-Aug-14 8:57am View
   
We need to see how you are setting up your query (command object and it's parameters?). Please use the improve your question function.
PhilLenoir 26-Aug-14 15:51pm View
   
Have you looked at recursive Common Table Expressions? here's a good write-up: http://www.mssqltips.com/sqlservertip/1520/recursive-queries-using-common-table-expressions-cte-in-sql-server/
PhilLenoir 26-Aug-14 9:53am View
   
You must make it a Windows service application. There are walkthoughs available on-line.
PhilLenoir 26-Aug-14 9:45am View
   
Sorry, your question makes no sense. Please use the improve question function. Do you mean change a value of other records, because storing derived data is dangerous (you should try to derive on the fly). Your allusion to linked lists makes no sense either. If you want to implement a linked list in a database, you would need a home for pointers. If you want to keep data associated as a group, use a related table.
PhilLenoir 25-Aug-14 15:59pm View
   
I have to assume that the offer_id value you are using does not exist in the ADMIN_OFFERS table.
PhilLenoir 25-Aug-14 12:05pm View
   
You can use the SHELL32 API. The Shell object recognises zip folders. The CopyHere and MoveHere methods are asynchronous, so multiple calls for the same zip folder may find the zip file locked but no error is returned to the calling application. Multiple calls require a delay. Multiple files using wildcards in one call are synchronous (sequential) so this doesn't apply.
PhilLenoir 25-Aug-14 12:01pm View
   
Deleted
Use Shell 32 API DLL, The shell object recognises zip folders. Be warned that for multiple files, the operation is asynchronous, so the zip file may be locked. Multiple files using wildcards are synchronous (sequential) within that call, but multiple calls may find the zip file locked.
PhilLenoir 25-Aug-14 9:48am View
   
I'm sorry, but there just is not enough information in the code. What is the update statement of the CommandBuilder from that data adapter? You may be better off building the command yourself. Note that da.Update is not necessarily a SQL Update statement, thet method could invoke Insert, Update and/or Delete queries It simply means synchronize the database with this adapter's dataset. Can you see why it's important to: Use meaningful names; avoid global references; add comments?
PhilLenoir 25-Aug-14 9:26am View
   
There are deeper repair tools available for MDBs where Access itself can't fix the database. Even if the file can be repaired, you may lose some data. Do you have a recent backup? A combination of fixing the file and compairing to a backup might be necessary.
PhilLenoir 25-Aug-14 9:21am View
   
Great, I had assumed that your original query was OK without the percentages. The important thing to understand here is that the math is not commutative because SQL Server casrs as it goes: Let's suppose we have 10 out of 100 = 10%. If we divide 10 by 100, cast to an integer the answer is zero. If we then multiply by 100 we get zero. However, if we multiply 10 by 100 we get 1000. Finally dividing by 100, we get 10 (percent) = the answer we're after!
PhilLenoir 22-Aug-14 10:47am View
   
I'm sorry, the language you are using is not precise enough. If you can indicate 11 or 33, give a concrete example of your own or show your attempts I can't give you an exact answer.
PhilLenoir 22-Aug-14 10:06am View
   
... and my solution required typically 3 - 6 MB files and sometimes less. It's not a question of agreeing, it's a question of different contexts!
PhilLenoir 22-Aug-14 10:01am View
   
Sorry if I seem dense, but you say "for all sites", do you mean "for each site". Let's give an example: lets say there are three sites and on a given date each site has one of each type of job. Do you wnat an answer of 33% or 11%?
PhilLenoir 22-Aug-14 9:55am View
   
I suggest reading up on relative positioning versus absolute positioning and z-order on the internet. There are many good sites that demonstrate positioning attributes. It can get complicated as these are related to containers (e.g. divs within divs) and can impact layout in different form factors.
PhilLenoir 22-Aug-14 9:46am View
   
Have you tried looking at the event logs?
PhilLenoir 22-Aug-14 9:45am View
   
It's still npt clear to me what you exactly want want: Percentages on each side of the union? (so percentage of "firstjobs" against jobs for that "jobdate" and percentage by all sites) or percentage of jobs at all sites (harder). What are the data types of your "jobs" columns?
PhilLenoir 22-Aug-14 8:53am View
   
Have you considered using WPF?
PhilLenoir 22-Aug-14 8:44am View
   
You don't say how you are loading pages. If you load different web pages, there is no way that state is passed from one to the other or retained unless you make it happen. Have you considered a multiview control on a single web page.
PhilLenoir 22-Aug-14 8:42am View
   
You don't say what the problem is: Exception, no rows when you are expecting values? Please improve your question. Have you considered using the ASP.NET identity/roles/membership schema? It does all the heavy work for you. Also, depending on the sensitivity of your data, storing passwords in plain text is risky.
PhilLenoir 21-Aug-14 15:52pm View
   
Have you added an installer class (project => add new item => General +> Installer class)?
Once you have an installer class, you view in the design pane, click on the Service Installer and your properties pane shows a startup option.
PhilLenoir 21-Aug-14 15:38pm View
   
Jesse, I've had another look at the code. What does SalesDetails() do? You run the update code before the insert code, could this be the problem? Also, check your text boxes in debug just before you use them in the command params. This will hopefully stop us chasing ghosts!

One more thing, the transaction code will not help you with conflict on stock quantity if you update from the stock text box, use OrdQty. Explanation: user 1 selects Car ID 3 and there's 4 in stock. Then user 2 selects Car ID 3, there are still 4 in stock. Each user orders 1 car; both processes update the stock left to 3 when the real answer is 2 (stock text box is 4-1). If you reduce the stock by OrdQty you will get the right answer as the Update is atomic.
PhilLenoir 21-Aug-14 15:13pm View
   
Jesse, I just noticed that you don't deal with an exception, there's nothing in your Catch section. Are you sure that there are no errors? I'd grab any exception message and log it, or at least look at it in debug.
PhilLenoir 21-Aug-14 15:08pm View
   
... but that only helps the concurrency/atomicity issues it won't solve your update problem. Did you inspect those text boxes in debug?
PhilLenoir 21-Aug-14 15:06pm View
   
In Access you would have to use a transaction and commit or rollback the transaction appropriately. Have you thought about using SQL Express, then you would be able to use stored procedures? See http://msdn.microsoft.com/en-us/library/93ehy0z8.aspx for transactions with OleDB.
PhilLenoir 21-Aug-14 14:49pm View
   
... what data type is your key? If there are trailing spaces in either the where clause value or the table, this will throw the record seek.
PhilLenoir 21-Aug-14 14:47pm View
   
Jesse, thanks for the update. The most logical explanations are the key you are using is not finding the record or you are updating with the same value. Any update with a WHERE clause that finds no records is not an error. Have you inspected CarID.Text and Stock.Text at run time? How about the modified date after the update ran, has it changed? That would be a useful diagnostic. What back-end are you using?

Please note that although refreshing the quantity after the model is selected does not remove the atomicity and concurrency issues, although it may reduce the window a little. You don't know how long an end user will take to commit the final order.
PhilLenoir 21-Aug-14 12:30pm View
   
Sergey, maybe the answer could have been worded better, but I stand by the solution. Here were my thought processes. I saw that the outer list had not been initialized. It's an unusual nested declaration, so I did a quick test in VS 2010, the compiler was happy. The poster said he had tried "New" everywhere he could think of. Now we've all been caught looking for a problem in the wrong place, but what if he'd tried the declaration and it didn't work. I have no access or information about his environment and I'm certainly not going to test every variant of VS builds, yet alone other non VS compiler options. So I typed the right answer but added the caveat. Now my assumption is that the poster will see the first line and thinks "Oh, crap, I didn't try that", problem solved with a tight strongly typed declaration. But if he reads it and he had already tried that, he's no further forward. Maybe it has never happened to you and it doesn't happen often , but sometimes a toolset misbehaves and you have to find a quick and dirty solution. The second declaration is just such a suggestion. Maybe you would have been happier if I'd typed that all out, but I do tend to assume that the reader has a brain and coding standards.

Now when you assume that I don't know that the the first declaration is correct you not only assume facts not in evidence, but I did use the words "The code should read ...". Next you did impune my morality "(Yes, and be careful with wrong answers, like Solution 1, where I can even see some ethical problem :-( )" For you to question my ethics was outrageous. Now maybe you can see why this made me so angry. I submit that the answer was not wrong and that an honourable approach on your part would have been to suggest your own solution without impugning me or mine.

We seem to have had a communication breakdown here. I don't mind criticism when it's justified. In fact I'm my own harshest critic and accept that more verbose wording might have avoided this spat, but the essence of the solution was 100% and so were my motivations. The, in my view, unjustified criticism still irks and the personal sleight was salt on the wound.
PhilLenoir 21-Aug-14 9:51am View
   
Sorry, I don't have time to test a solution, but it looks to me that you are effectively trying to get Word to create a table in the first cell of an existing table. When I've populated a table in Word from a database, I've had an empty row, I put my insert point into the first cell of that row, write my first field, advance to the next cell, repeat for each field and add a row to the table for each subsequent record and repeat for each record. There may be a faster way, but I had to have provisional behaviour based on the data, so enumeration was the way to go.

If you don't already do this, I'd suggest recording a macro to mimic this behaviour and hand coding it to use your recordset.
PhilLenoir 21-Aug-14 9:42am View
   
What are the sizes of the images? I'd suggest either beefing up your database server or researching Filestream columns, but without more information it could be anything from a poor network connection to other processes overworking your database.
PhilLenoir 21-Aug-14 9:35am View
   
YOu really need to elaborate your question; use the improve question function. What is in the databases? What technologies are they built in? Compare schemas or contents?
PhilLenoir 21-Aug-14 9:22am View
   
I notice that your button ID is BtnLink. How are you instatiating LinkToButton?
PhilLenoir 21-Aug-14 9:12am View
   
Eduard, that's why it's not a solution! :) I looked at Filestream recently but decided against using it and sticking to the tried and tested binary types. Good luck!
PhilLenoir 21-Aug-14 9:08am View
   
Good one! I forgot ROWNUMBER inOracle. It's been a few years!
PhilLenoir 20-Aug-14 16:52pm View
   
Sergey, can you point out where I attacked you. I have attacked your behaviour. If I'm frustrated it because this is what I said:

"I don't see the problem unless the compiler has a problem with the nested list declaration. The code should read:

Dim SeriesList as New List(Of List(Of PlotData))"

This is exactly the solution. Where am I on the wrong path? I had to assume that this was not working for the poster? I'm trying to give quick solutions to help a fellow professional. I have no problem if you want to add some education on error trapping and pointers to technical documents. Genuinely, good for you. But downvoting and criticizing a viable solution and actually the correct solution and imposing your style of answer on the rest of us is uncalled for. I say again that you have done good work on here, but putting the boot in to my solution is not fair game.
PhilLenoir 20-Aug-14 15:57pm View
   
Please elaborate your question. Do you mean only one user using a system at once, that each user id is unique or something else?
PhilLenoir 20-Aug-14 15:54pm View
   
I've always worked on systems where the .NET support for Office is already installed. If you make the Access PIA a dependency of your .NET project, it should be installed with your own application. You mentioned Citrix, if the users are running the software remotely, the install may only need to be on the Server. I've done a lot of work with Governement and quasi governement and it's not usually impossible (difficult, Yes!) to get additional software installs approved; there is almost certainly a rigorous testing and approval process though.
PhilLenoir 20-Aug-14 15:04pm View
   
Do you have or can you add a unique ID column to the table. If so a correlated subquery will work based on the unique ID.
PhilLenoir 20-Aug-14 14:37pm View
   
My solution does work. You even falied to spot that he exactly described where his error was. There are two types of people who post answers: Those of us who are collaboratively minded and those who are trying to demonstrate their supoeriority. It turns out it was exactlty as I suspected. The poster had missed the new on the first declaration. The first suggestionI proffered was exactly what was required. I had assumed that he had tried that but put it in anyway. If it failed in his environment, not mine or yours, then there had to be another reason. It's never reasonable to make personal attacks in these fora. That's exactly what happens in SO. It discourages people from asking questions and offering solutions. You say "enough of this discssion" after making a personal attack and downvoted my solution both, alternatives of which work. You can't just make insults then say enough; it's infantile. With your rep on here, I have to assume that you have helped lots of people, but that doesn't give you the right to throw out personal attacks. Shame on you.
PhilLenoir 20-Aug-14 12:38pm View
   
BS. I've been programming for more years than I care to mention. I do not believe that any professional programmer writes perfect, bug free code at first pass all the time. You are making personal attacks on me when I offered a solution that works. Get over yourself.
PhilLenoir 20-Aug-14 12:34pm View
   
Why are yopu trolling. You seem to be denying that the solution does not work. It does.
PhilLenoir 20-Aug-14 12:29pm View
   
... and we all have to program by trying. Most especially when our toolsets are buggy (which they often are). Workarounds are rarely, if ever, best practice, but sometimes you gotta do what you gotta do.
PhilLenoir 20-Aug-14 12:26pm View
   
Sergey, if you read his question, he said he had tried "New" in various places. I don't believe there would be any problem with the first line, but depending on his version of VS there may be a parser bug. His reference to his attempts would lead me to assume that he had tried just that. I prefer to give options, that way the asker can get on and solve his problem without bouncing things backwards and forwards. If I believe I know all the facts, my answers are more direct. 1) I didn't realize that you had given an answer to a similar question from him. 2) I offered a solution which will work on my version if VS, however I never assume facts not in evidence, so the second option works. The cast would only be necessary if he had to use a generic and would ensure that his contained list was strongly typed to a list.
PhilLenoir 20-Aug-14 12:08pm View
   
What do mean "parent page" is it a Master Page Template or is it frames? Use Improve Question to add some more detail. In any case, I'd suggest using JavaScript on the client side and not use server side code.
PhilLenoir 20-Aug-14 11:59am View
   
I've not used Filestream, I still store my binary data in a varbinary(max) field as my understanding is that you don't really his any benefits until you have really large files. However, my understanding was that you merely need database permissions and the SQL Agent actually writes the data out into the file system, so it's the SQL process that needs file permissions. Furthermore, you just queried the data like any other column. I hope this helps.
PhilLenoir 20-Aug-14 11:04am View
   
None of these solutions require the user to run Access. I still say that the best solution is to automate Access using the PIA. The only prerequisite is that Access (and the PIA) must be installed on the target machine. The manual preparation in Access is not even a programming task and should be easy for you. Using the PIA should be no different from any other Office automation task. Use the RunSavedImportExport of the DoCmd object.
PhilLenoir 20-Aug-14 10:07am View
   
Please provide a better explanation. What does 2.3, 2.8 and 4.11 mean? These are not normal expressions for months or years. It looks to me that that are adding 2+2 and 8+3 and using a period to separate the pair of numbers in each case? Help us to help you, use the Improve question option.
PhilLenoir 20-Aug-14 9:38am View
   
I think that you are going to have to use their support function. You might try sending the request to a debugging page on your own server to examine the source that you are rendering. I would expect their error response to have some code/information returned explaining the error (that you might need to refer to their documentation to explain) They should also be logging the errors at their end, so they should be able to tell what the issue is.
PhilLenoir 20-Aug-14 9:31am View
   
Do as Richard suggests. I've worked with Office automation for years and it's exactly what I do. Understand the code generated and modify to your needs, including your validation code. Anything you don't understyand, search for help on the class and its members. Please note that you are trying to set a worksheet object as a range (shttocopy). Declare the receiving variable as a range object (e.g. Dim rangetocopy as Range)!
PhilLenoir 20-Aug-14 9:15am View
   
What symptoms are you getting? What technology is the application? What is being used to render the image? Is the image database sourced or file system?

Please improve your question and give enough information for someone here to help you!
PhilLenoir 20-Aug-14 9:02am View
   
Why don't you use the ASP.NET login/Membership/Roles schema? It provides a rich set of classes for managing users and permissions and all the heavy lifting is done for you. You can configure to store plain text passwords or encrypted (I believe it defaults to encrypted.) By default it requires a SQL Server (SQL Express too) back end, but I think that you can configure to use other back-ends.
PhilLenoir 19-Aug-14 14:18pm View
   
Your question was truncated, you might want to edit it? It looks like you have two libraries referenced containing the same class. You could remove the ,presumably redundant, reference from your project or change the name of your master page.
PhilLenoir 19-Aug-14 14:13pm View
   
What's the data type of the stored hash? If it's a char then it may have trailing spaces which would fail a string comparison.
PhilLenoir 19-Aug-14 11:06am View
   
Sounds to me like you have all you need in the error message. You need to debug the calls to that stored proc (sp_xml_removedocument). Aq uick skim showed just two near the end of the code, so: Is @DocHandle or @DocHandle1 invalid? If they seem to be valid to you, I'd look at the documentation for that stored proc.
PhilLenoir 19-Aug-14 10:59am View
   
What is writing to the registry? Where are you deploying? Can you use impersonation with a click-once authorization to write to HKLM?
PhilLenoir 19-Aug-14 10:41am View
   
I've not used the .NET libraries for this, but my technique is always to record a macro to do pretty much what you want in Word and go to the VBA. Grab that code and edit it C# to refine the behaviour and ensure your references are OK.
PhilLenoir 19-Aug-14 10:32am View
   
What do you mean injected? Have you "hacked" the third party app, is there a mechanism in the app to configure a callout function or a hook or add-in? Do you want to call the function from your own code? Is there some macro language in the 3rd party application to call external libraries?
PhilLenoir 18-Aug-14 15:57pm View
   
For the map and display look for help in Bing Maps or Google Maps. You can use KML, Javascript and/or .NET to add labels etc. to these maps. For a more complete solution, look at ESRI web services and tools.
PhilLenoir 18-Aug-14 11:17am View
   
I believe that you can use Forms authentication and roles with an Oracle backend if you set up your connection and load the ASP.NET user/role structure correctly in the Oracle database., but if you have Windows authentication, why do you need it? - use Active Directory?
PhilLenoir 18-Aug-14 11:09am View
   
I'm not sure what putting your stored proc name in brackets would do, but you don't need them (cmd.Text = "xx" not cmd.Text =("xx").)
PhilLenoir 18-Aug-14 11:03am View
   
What OriginalGriff said, but the error looks like an INSERT statement is missing a value in a required column.
PhilLenoir 18-Aug-14 10:43am View
   
Have you tried setting an environment variable with your VB and using that instead of ERRORLEVEL?
PhilLenoir 18-Aug-14 10:41am View
   
Is the onclick expression in an ASP server control? If so, you need OnClientClick as OnClick would be processed as a server event.
PhilLenoir 15-Aug-14 11:28am View
   
Geoff, how do they reply to the request. My eCommerce provider uses an iFrame that contains a page that posts to them. They then redirect to a page I provide and I pick up their returned values there. Refer to your provider's documentation. Does the end user interact with this page? If not, another mechanism is to send the Post request using an HTTP object and receive the request directly (no browser).
PhilLenoir 14-Aug-14 17:06pm View
   
A trigger is not a function, it is a stored procedure itself. You can call a stored procedure from within a trigger, although you might have issues if the stored procedure causes the trigger to fire or if the trigger is a before trigger and the stored procedure is to work with the rows that fired the trigger.
PhilLenoir 14-Aug-14 11:54am View
   
If you create a blank ASPX page and replace the form tag and its contents with your HTML form it will work exactly the same. ASPX is contstructed from XHTML which is simply HTML with more tags. I assume that you must use the above field names for the bank? Do you want to get the values on your server side?
PhilLenoir 14-Aug-14 11:01am View
   
Please post your query
PhilLenoir 14-Aug-14 10:15am View
   
Do you mean the controls in a web form? To enumerate use the controls collection.
PhilLenoir 14-Aug-14 10:13am View
   
Do you use a login? If yes, do you use the ASP.NET login schema?
PhilLenoir 14-Aug-14 9:59am View
   
What do you actually have in your database? A table with a column that has the values 5,10,15,20?
PhilLenoir 13-Aug-14 17:27pm View
   
I can't say I've ever had that problem and the last one I did was a pretty complex eCommerce application that involved passing data to and from a card processor via an iFrame. The application that the poster mentioned was a simple application. My programming mantra is KISS: Keep It Simple Software developer!
PhilLenoir 13-Aug-14 11:10am View
   
I don't understand the problem. That code should be just fine in an aspx. Does your question relate to using ASPX server controls instead of HTML ones?
PhilLenoir 13-Aug-14 10:01am View
   
That's exactly why I said "in this case"; as developers, sometimes we have to work with schemas we did not create and have no control over. I regularly have to query MS backs ends, that aren't always developed to my standards (e.g. Dynamics GP which uses a lot of char fields padded with spaces).