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 strongm 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: *

  1. bdotzour

    Why does this self join give no rows?

    tlbroadbent hit it with the second query. What I want is, indeed, to do a left join on a table with itself. In fact, I want to do it several times. The scenario I have is this, I have been given a table with data in rows that I want to convert to columns. Example: RecordID FieldName...
  2. bdotzour

    Why does this self join give no rows?

    Given a table defined like this: MyTable ItemID SubItemID SubItemValue 0 0 0 0 0 15 0 1 20 0 1 25 If I execute this self-join: select t1.subItemID, t2.SubItemValue from mytest t1, mytest t2 where t1.subitemid = 1 and...
  3. bdotzour

    Who is doing that SELECT statement?

    I'll take a stab at answering my own question. It appears that when you create a stored procedure that does a normal SELECT statement, that statement is executed with the permissions of the user who created the sproc. However when the proc uses sp_executesql the SQL is executed as the user who...
  4. bdotzour

    Who is doing that SELECT statement?

    Hi all. I'm working on a set of sprocs to act as wrappers to our database and I want to create a new user/role to ONLY have EXECUTE privileges on these procedures. Now, the procedures themselves are executing SELECT statments on other tables that the user does NOT have privileges to. This is...
  5. bdotzour

    Why does ADO think that values of datatype text are always NULL?

    I'm using VB and ADO to access my SQL Server 7 tables. The problem I'm running into is that one of my columns is of type TEXT. When I open the recordset on this table, all of the values in the text column are NULL, even when there is definitely data in that column. Does anyone know what gives...
  6. bdotzour

    combining results from 2 sproc calls

    This may be hopeless, but what I want to do is essentially call a sproc 2 times, each time with different parameters, and then AND/OR the result sets. What I'd love to do is this: select * from table where id in ( sproc 'TX' union sproc 'CA' ) Any ideas at all?
  7. bdotzour

    Using ADO recordset is SLOW?

    Interesting! I just used Crystal Reports itself, created a new report with the wizard, and chose to use the Active Data connection and I got the same kind of response. It took about 20 seconds to generate the report. So does this mean I can't use this approach unless I want to take the...
  8. bdotzour

    Using ADO recordset is SLOW?

    It's a SQL Server 7.0. Connection string is like this: Driver={SQL Server};" & _ "Server=server;" & _ "Database=db;" & _ "Uid=me;" & _ "Pwd=password;"
  9. bdotzour

    'Server has not yet been opened' error message

    I ran into this problem and it took me a long time to figure out. My problem was that I wasn't setting the logon info for the tables I was trying to access. I don't know how this applies to using a stored procedure, but I had to do this: Report.Database.Tables.Item(1).SetLogonInfo <server>...
  10. bdotzour

    Using ADO recordset is SLOW?

    I'm doing it through code. It looks like this: Dim m_Application As New CRAXDDRT.Application Dim m_Report As CRAXDDRT.Report Dim m_ADOrs As ADODB.Recordset Dim m_ADOcnn As ADODB.Connection Set m_ADOrs = CreateObject(&quot;adodb.recordset&quot;) Set m_ADOcnn =...
  11. bdotzour

    Report designer control, setting sql string for report

    Well, from debugging, it appears that the SQLQueryString value stays blank (&quot;&quot;) even immediately after my assignment statement. I guess that would explain why the report doesn't have my query. =) Why would this call not work?
  12. bdotzour

    Report designer control, setting sql string for report

    After searching and reading and failing, I hope I can find help from the gurus. Here's what I'm doing in a nutshell: 1. The basic form (copied from dev. guide) with two tabs (one for report design, one for preview). 2. I want to filter out the records that will show up in the report that the...
  13. bdotzour

    Using ADO recordset is SLOW?

    There's a bit of a twist to this that I should add. The full use case of the project here is: 1. User types in a SQL query, hits button 2. Up comes CRDesigner form 3. User chooses fields to use in report 4. User then previews the report and it should reflect only the rows selected by the query...
  14. bdotzour

    Using ADO recordset is SLOW?

    My project involves the CR 8.5 RDC and Visual Basic and I need to basically let users type in their own SQL queries and press a button and have a report come up that reflects that query. My first stab was to just use the regular ODBC connection stuff ( Add the tables I want to the report...
  15. bdotzour

    Using column name in select statement??

    Fantastic! Of course you were right about the mixup, but i'm glad you knew what i meant. Thanks so much. :)
  16. bdotzour

    Using column name in select statement??

    I want to do this: create procedure simple @col char(40) as select * from @col But that doesn't work. Can anyone help me find out how to pass a variable containing a column name and then use that variable in the select statement? Thanks!

Part and Inventory Search

Back
Top