I am developing with VB 6 SP4, MDAC 2.5, SQL server 7.
I am currently having difficulty with raising errors back to VB from a SQL 7 sproc. Within the sproc I call "sub" sprocs to lookup different values (factors) and return 0 if success and 1 if the factor is not found. The main...
I am developing with VB 6 SP4, MDAC 2.5, SQL server 7.
I am currently having difficulty with raising errors back to VB from a SQL 7 sproc. Within the sproc I call "sub" sprocs to lookup different values (factors) and return 0 if success and 1 if the factor is not found. The main...
I would use a stored procedure to return only the records you want printed on the report. This will also allow you to create parameters to pass to the stored procedure to allow the user to enter criteria.
Let me know if you would like an example. Send me your email address and I will send you...
I used the following:
SELECT *
FROM (Select top 1
4 AS JustANumber, au_id, au_lname, au_fname, state, contract
from authors
where state = 'CA'
order by contract ASC) AS TEMP1
UNION
SELECT *
FROM (Select top 1
5 as JustANumber, au_id, au_lname, au_fname, state, contract
from authors
where...
May I make a suggestion? Use the SQL to return the fields only and code your application to do the concatenation. Your development language should have much better string handling capabilities than SQL itself.
Hope this helps.
bbosley
What is wrong with the following T-SQL running in SQL 7.0 against the pubs database?:
Select top 1
4 AS JustANumber, au_id, au_lname, au_fname, state, contract
from authors
where state = 'CA'
order by contract ASC
UNION
Select top 1
5 as JustANumber, au_id, au_lname, au_fname, state, contract...
If you are looking to verify the userid and passoword against a sql table of usenames and passwords you just need to select the userid from the table and verify the password returned is the same as the one entered. I would create a function that sends 2 parameters, Username and password and...
I would use ADO. You only need to change the connect string of the connection object when you go to SQL Server. Up front planning can save a lot of time later on.
Hope this helps.
Bryan Bosley
When the user first runs your program get the date from their computer and store it in the system registry. Then each time the user executes your app check if the record is in the registry. If it is check the date. If not, insert the record into the registry.
Hope this helps.
Bryan Bosley
If the field is being stored in a database table you can have the table field automatically increment (in SQL Server it is an IDENTITY field, and in ACCESS it is an AUTONUMBER field) the field number and then use the @@IDENTITY (in SQL Server) to retirieve it after the INSERT.
If it is just for...
Hi,
I had the exact same problem. I have a question (sorry if it is a stupid question). Is your SQL Server stored proc def something like this (make sure you have the output parameter declared as OUTPUT):
ALTER PROCEDURE usp_GroupDesign
@ClientCode BIT,
@Client BIT OUTPUT
Here is an...
I have VB 6.0 SP3 code that is executing a series of SQL Server 7.0 stored procedure with ADO 2.1 connection and command objects. My problem is when the stored procedure raises an error back to the calling VB app. The VB app does not handle the error. Here is an example of the code:
In...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.