Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: lechuck
  • Content: Threads
  • Order by date
  1. lechuck

    Report based on Stored procedure doesn't work on client machine

    I have a report created with RDC in VB6 with Crystal Reports 8.5. The report gets data from a stored procedure (MS SQL2000). All works fine from my development machine, the report publish the data and can be viewd in the crystal viewer component. But when I put my application on a client...
  2. lechuck

    Save result from stored procedure in variable

    I have one Stored procedure that looks like this CREATE PROCEDURE sp_test @c AS SELECT a, b, c FROM my_table WHERE c=@c Now I want to execute this sp whithin another sp. To store the result in a variable when selecting from a table is easy (select @myVar=a FROM my_table) but how does it...
  3. lechuck

    procedure that handle other procedures from within

    I have two procedures, that returns data from the same table, but with diffrent where clauses. In some cases the procedures returns a row that exist in the result from both procedures. (I have an ID field in the table) Now I need help with a third procedure that executes sp1 and sp2, and if...
  4. lechuck

    Check which user who is processing current stored procedure

    I have a stored procedure that i need to check which SQL-user who is processing the current procedure. Is this possible and how do I accomplish that?
  5. lechuck

    Sort out some rows with a query

    I need some help whith an sql query. the query "select date, user, location, ip from myTable" returns this date user location ip ----------------------------------------------------- 2003-11-08 23:32:12.000 bob Uptime 1.2.3.4 2003-11-08 23:31:52.000...
  6. lechuck

    Backup script

    Hi I've created a litle backup database script that users that don't have the MS SQL Server Enterprise Manager could use. The script looks like this DECLARE @dbName varchar(100) DECLARE @backupFolder varchar(200) DECLARE @path varchar(250) DECLARE @db varchar(150) /***** CHANGE this...
  7. lechuck

    Tricky join question

    I have two tables usrTable and testTable. select * from usrTable u_id usr ----------- ------------ 1 sa 2 bob 3 john select * from testTable t_id usr1 usr2 usr3 ---------- ---------- ---------- ---------- 1 1...
  8. lechuck

    Convert mystery whith User SID to varChar

    I want to convert the user SID to varChar, I have successfully converted a local SQL users SID to varChar, se the code below. Q: SELECT SUSER_SID('MyUser') A: 0x15489420B0A30543B2CD88D4EE4E6C37 Q: SELECT SUSER_SNAME(0x15489420B0A30543B2CD88D4EE4E6C37) A: MyUser Q: SELECT...
  9. lechuck

    Problem storing a string with special characters

    I've noticed that a string I stored into SQL server does not appeare to be the same as the orginal string. If I have the string "Œ‘•" and store it into the database field that is of type varChar, then I read the string and get the value: "O_'¤". I'm using the VB code...
  10. lechuck

    Get the last added records ID

    I have a table MyTable that contain too columns: Col1 that stores chars and a ID column configured as a counter. I did a test on SQL7.0 Server with the following code: INSERT INTO MyTable(Col1) VALUES('MyValue') SELECT @@IDENTITY AS 'NewID'; It insert MyValue into table MyTable, then it...
  11. lechuck

    Creating a database using script

    I want to make a script out of a database I have created. I have tried to use the "Generate SQL scripts" tool in the Enterprise Manager. But when I want to create the database on another server using the query analyser to run the generaded script it fails. Any suggestion of what i...
  12. lechuck

    how to run the stored procedure 'sp_who' and get the result in VB

    I want to get the result from the stored procedure sp_who (on a SQL server) into my VB code. sp_who shows an table so it would be nice to get the result in an adodc recordset. Thanks /lechuck
  13. lechuck

    Check how many users that are connected to an SQL server database

    Is there any way from VB code to check how many computers/users that are connected to an database on an SQL server 7. I have a program that i have developed in VB that works against an SQL server. Now i want to implement an licens check, so if a customer has 5 license the program will only...
  14. lechuck

    Accessing an secured database with INSERT statement

    I'm working with a project of converting an application that use a access database to work against a SQL server 7.0 database. Is it possible to access an password secured access database within the sql statement INSERT INTO? I have tried without any luck.... Any better suggestion to insert...

Part and Inventory Search

Back
Top