From artful at rogers.com Thu May 1 07:43:43 2003 From: artful at rogers.com (Arthur Fuller) Date: Thu, 1 May 2003 08:43:43 -0400 Subject: [dba-SQLServer]RE: [dba-VB] Trusted Connection versus What? In-Reply-To: <00bc01c30f68$51b41e40$b615010a@FHTAPIA> Message-ID: <061b01c30fdf$4cb46400$8e01a8c0@Rock> Thanks Robert and Francisco, now I have NO idea what I should do! :-) In fact I have also lost track of what a trusted connection is, and what a challenge-response is. Let me re-ask the original question (which, incidentally, concerns getting the IBuySpy portal and store samples running. It seems that I have at least two choices: 1. Change the server settings to use Windows authentication. If I do this, does that mean I must create a Windows security group and then add any users that I expect to hit the box? (That's ok, this is development stuff so there will only be me and a couple of fictional users, but I've never done it before.) 2. Change the connection string to embed a password and uid and lose the trusted connection part of the string. Am I on the right track? Arthur P.S. In my current configuration, SQL Server, IIS and the .NET Framework are all on the same box. But I have two other boxes available, both running SQL 2000 as well, so I could move the databases to one of those instead, if that would help. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco H Tapia Sent: April 30, 2003 6:32 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer]RE: [dba-VB] Trusted Connection versus What? If the Sql Server is set to windows authentication and the IIS box is hitting your sql server, I thought that "it" (the IIS server) was passing it's security context for the connection. I did not know that you could implement windows authentications from an ASP page, still then the short and quick answer for Arthur's question is you "can't" implement both sets of security in which it piggy backs one on top of the other, in this solution. Granted it does sound like a neat way to implement Windows authentication. -Francisco http://rcm.netfirms.com On Wednesday, April 30, 2003 2:53 PM [GMT-8], Djabarov, Robert wrote: : Windows Integrated Authentication is not based on the web box, but on : the rights associated with it or through a Windows Security group on : the SQL server itself. In order to incorporate a Windows : Authentication on your web site you need to implement a Windows : Challenge Response within your ASP/JSP page. And, it definitely does : not require a VPN! : : Robert Djabarov : Senior SQL Server DBA : USAA IT/DBMS : ? (210) 913-3148 - phone : ? (210) 753-3148 - pager : : : -----Original Message----- : From: Francisco H Tapia [mailto:my.lists at verizon.net] : Sent: Wednesday, April 30, 2003 4:07 PM : To: dba-sqlserver at databaseadvisors.com : Subject: Re: [dba-SQLServer]RE: [dba-VB] Trusted Connection versus : What? : : Arthur, : I believe that windows authentication mode would grant access : based on : the rights from the box (web server) that connects to the SQL Server. : You : could set up you web site to capture the loginid and pwd and ask for a : connection on the sql server using mixed mode (or sql : authentication). I : don't know how you'd set it up to ask for windows login + sql server : login : unless of course you set up a VPN, to which your users would connect : to an : intranet that would then ask for another login and pwd. : : -Francisco : http://rcm.netfirms.com : : On Wednesday, April 30, 2003 1:50 PM [GMT-8], : Arthur Fuller wrote: : : :: My vague game plan was to have a login called Anonymous with no :: password and decidely limited privileges. Then the web site can open :: the door for anyone. Other logins would correspond to employees, :: sales reps and so on, all aggregated into roles defining their :: privileges. The BOD could see reports that mere mortals couldn't. My :: Access app already does this, but now I need my .NET app to do it :-) : : : : _______________________________________________ : dba-SQLServer mailing list : dba-SQLServer at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-sqlserver : http://www.databaseadvisors.com : : : : _______________________________________________ : dba-SQLServer mailing list : dba-SQLServer at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-sqlserver : http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From davide at dalyn.co.nz Thu May 1 17:39:28 2003 From: davide at dalyn.co.nz (David Emerson) Date: Fri, 02 May 2003 10:39:28 +1200 Subject: [dba-SQLServer]SQL2000 Security - Preventing access Message-ID: <5.2.0.9.0.20030502103431.02d16e40@mail.dalyn.co.nz> We are in the process of completing a new installation. We have created a runtime WXP ADP with a SQL2000 BE. We have set security so that users that log onto the program can only access the parts that are relevant to them. Fine so far. What I haven't worked out yet is - What happens if someone gets hold of the SQL database file (say for example from a backup tape), takes it home and attaches it to their own copy of SQL. Is there any way to prevent them from being able to access the data or objects? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 From tuxedo_man at hotmail.com Thu May 1 18:42:24 2003 From: tuxedo_man at hotmail.com (Billy Pang) Date: Thu, 01 May 2003 23:42:24 +0000 Subject: [dba-SQLServer]SQL2000 Security - Preventing access Message-ID: AFAIK the answer is no, there nothing you can do to prevent them from being able to access the data if they bring home the db file. Billy >From: David Emerson >Reply-To: dba-sqlserver at databaseadvisors.com >To: dba-SQLServer at databaseadvisors.com >Subject: [dba-SQLServer]SQL2000 Security - Preventing access >Date: Fri, 02 May 2003 10:39:28 +1200 > >We are in the process of completing a new installation. We have created a >runtime WXP ADP with a SQL2000 BE. We have set security so that users that >log onto the program can only access the parts that are relevant to them. >Fine so far. > >What I haven't worked out yet is - What happens if someone gets hold of >the SQL database file (say for example from a backup tape), takes it home >and attaches it to their own copy of SQL. Is there any way to prevent them >from being able to access the data or objects? > > >Regards > >David Emerson >DALYN Software Ltd >25b Cunliffe St, Johnsonville >Wellington, New Zealand >Ph/Fax (877) 456-1205 > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From accessd at shaw.ca Thu May 1 19:32:48 2003 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Thu, 01 May 2003 17:32:48 -0700 Subject: [dba-SQLServer]SQL2000 Security - Preventing access In-Reply-To: <5.2.0.9.0.20030502103431.02d16e40@mail.dalyn.co.nz> Message-ID: Hi David: If anyone gets access to your server room and the tapes stored there; there is nothing they can not take. That is why Server rooms are usually securely locked. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of David Emerson Sent: Thursday, May 01, 2003 3:39 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer]SQL2000 Security - Preventing access We are in the process of completing a new installation. We have created a runtime WXP ADP with a SQL2000 BE. We have set security so that users that log onto the program can only access the parts that are relevant to them. Fine so far. What I haven't worked out yet is - What happens if someone gets hold of the SQL database file (say for example from a backup tape), takes it home and attaches it to their own copy of SQL. Is there any way to prevent them from being able to access the data or objects? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From davide at dalyn.co.nz Thu May 1 19:46:04 2003 From: davide at dalyn.co.nz (David Emerson) Date: Fri, 02 May 2003 12:46:04 +1200 Subject: [dba-SQLServer]SQL2000 Security - Preventing access In-Reply-To: References: <5.2.0.9.0.20030502103431.02d16e40@mail.dalyn.co.nz> Message-ID: <5.2.0.9.0.20030502124430.00b5b598@mail.dalyn.co.nz> Thanks Jim and Billy, At 1/05/2003, you wrote: >Hi David: > >If anyone gets access to your server room and the tapes stored there; there >is nothing they can not take. That is why Server rooms are usually securely >locked. > >Jim > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of David >Emerson >Sent: Thursday, May 01, 2003 3:39 PM >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer]SQL2000 Security - Preventing access > > >We are in the process of completing a new installation. We have created a >runtime WXP ADP with a SQL2000 BE. We have set security so that users that >log onto the program can only access the parts that are relevant to >them. Fine so far. > >What I haven't worked out yet is - What happens if someone gets hold >of the SQL database file (say for example from a backup tape), takes it >home and attaches it to their own copy of SQL. Is there any way to prevent >them from being able to access the data or objects? > > >Regards > >David Emerson >DALYN Software Ltd >25b Cunliffe St, Johnsonville >Wellington, New Zealand >Ph/Fax (877) 456-1205 > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com From CWortz at tea.state.tx.us Fri May 2 09:13:53 2003 From: CWortz at tea.state.tx.us (Wortz, Charles) Date: Fri, 2 May 2003 09:13:53 -0500 Subject: [dba-SQLServer]SQL2000 Security - Preventing access Message-ID: David, If you have implemented security on the db and have the data encrypted, then you are making it harder for them. But, there is no way to protect anything from anyone willing to spend enough time and money to get it. The purpose of security is to make the cost of getting something illegally higher than the value of what they are trying to get. Who's going to be dumb enough to spend $$$ for something only worth $? So your mission is to assess how valuable is the data in the db and then secure it enough so somebody has to spend more than that to steal the data. Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: David Emerson [mailto:davide at dalyn.co.nz] Sent: Thursday 2003 May 01 17:39 To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer]SQL2000 Security - Preventing access We are in the process of completing a new installation. We have created a runtime WXP ADP with a SQL2000 BE. We have set security so that users that log onto the program can only access the parts that are relevant to them. Fine so far. What I haven't worked out yet is - What happens if someone gets hold of the SQL database file (say for example from a backup tape), takes it home and attaches it to their own copy of SQL. Is there any way to prevent them from being able to access the data or objects? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 From artful at rogers.com Fri May 2 11:01:30 2003 From: artful at rogers.com (Arthur Fuller) Date: Fri, 2 May 2003 12:01:30 -0400 Subject: [dba-SQLServer]SQL2000 Security - Preventing access In-Reply-To: Message-ID: <000701c310c4$1837cb50$8e01a8c0@Rock> Quite right, Charles. We're back to locked rooms. Any network rack not in a locked room is owned by an idiot, IMO. And further, anyone stupid enough to store credit card numbers unencrypted in a db is begging for a lawsuit. Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Wortz, Charles Sent: May 2, 2003 10:14 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]SQL2000 Security - Preventing access David, If you have implemented security on the db and have the data encrypted, then you are making it harder for them. But, there is no way to protect anything from anyone willing to spend enough time and money to get it. The purpose of security is to make the cost of getting something illegally higher than the value of what they are trying to get. Who's going to be dumb enough to spend $$$ for something only worth $? So your mission is to assess how valuable is the data in the db and then secure it enough so somebody has to spend more than that to steal the data. From harkins at iglou.com Sat May 3 15:27:04 2003 From: harkins at iglou.com (Susan Harkins) Date: Sat, 3 May 2003 16:27:04 -0400 Subject: [dba-SQLServer]Iif equivalent Message-ID: <005a01c311b2$61af38b0$d5ecffcc@SusanOne> I'm looking for an equivalent to Access' Iif() function -- can't seem to find anything -- is there one? In Access, you can use a quick expression in the form Iif(field=whatever,value,value) in a query to determine a field's content -- can you do the same in SQL Server? Susan H. From tuxedo_man at hotmail.com Sat May 3 15:31:15 2003 From: tuxedo_man at hotmail.com (Billy Pang) Date: Sat, 03 May 2003 20:31:15 +0000 Subject: [dba-SQLServer]Iif equivalent Message-ID: Look up CASE in BOL. >From: "Susan Harkins" >Reply-To: dba-sqlserver at databaseadvisors.com >To: "SQLList" >Subject: [dba-SQLServer]Iif equivalent >Date: Sat, 3 May 2003 16:27:04 -0400 > >I'm looking for an equivalent to Access' Iif() function -- can't seem to >find anything -- is there one? In Access, you can use a quick expression in >the form > >Iif(field=whatever,value,value) > >in a query to determine a field's content -- can you do the same in SQL >Server? > >Susan H. > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From theoden11 at attbi.com Sat May 3 20:43:43 2003 From: theoden11 at attbi.com (Mark Rider) Date: Sat, 3 May 2003 20:43:43 -0500 Subject: [dba-SQLServer]Sproc Output to VB? In-Reply-To: <00cd01c2fa40$9cd63490$b615010a@FHTAPIA> Message-ID: <000601c311de$98c70ea0$0a147f0a@c893163a> I have gone stupid looking for the answer to this. I have a sproc that calculates an average of several numbers, and runs fine in QA. I cannot figure out how to capture the output of the sproc so I can display it in anything other than QA, MSQuery, etc. The sproc is: CREATE PROCEDURE [sp_LongMA] @inparam datetime, @inparam2 datetime, @MA money OUTPUT AS Select Avg (QQQValue) AS MovingAverage From tblQQQ Where (QQQTime BETWEEN @inparam AND @inparam2) GO I call it from VB6 like so: ssql_Fast = DECLARE @MA1 datetime DECLARE @MA2 datetime DECLARE @MA money SET @MA1 = '" & FastTime1 & " ' SET @MA2='" & FastTime2 & "' execute sp_LongMA @MA1, @MA2, @MA = @MA OUTPUT Again, it runs with no errors, but also with no indication of a returned value. How do I write the @MA OUTPUT (the average) to a variable that I can access thru VB6? I set up an ADODB.Recordset in VB, call the sproc as above and get no errors, but I cannot figure out what to look for in the returned recordset to get the value of @MA. TIA, Mark Rider From mikedorism at ntelos.net Sat May 3 21:03:13 2003 From: mikedorism at ntelos.net (Mike and Doris Manning) Date: Sat, 3 May 2003 22:03:13 -0400 Subject: [dba-SQLServer]Sproc Output to VB? In-Reply-To: <000601c311de$98c70ea0$0a147f0a@c893163a> Message-ID: <000001c311e1$55192190$b5310cd8@hargrove.internal> You haven't set @MA to anything so it is returning nothing. Try the following... CREATE PROCEDURE [sp_LongMA] @inparam datetime, @inparam2 datetime, @MA money OUTPUT AS Select @MA = Avg (QQQValue) From tblQQQ Where (QQQTime BETWEEN @inparam AND @inparam2) GO Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark Rider Sent: Saturday, May 03, 2003 9:44 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer]Sproc Output to VB? I have gone stupid looking for the answer to this. I have a sproc that calculates an average of several numbers, and runs fine in QA. I cannot figure out how to capture the output of the sproc so I can display it in anything other than QA, MSQuery, etc. The sproc is: CREATE PROCEDURE [sp_LongMA] @inparam datetime, @inparam2 datetime, @MA money OUTPUT AS Select Avg (QQQValue) AS MovingAverage From tblQQQ Where (QQQTime BETWEEN @inparam AND @inparam2) GO I call it from VB6 like so: ssql_Fast = DECLARE @MA1 datetime DECLARE @MA2 datetime DECLARE @MA money SET @MA1 = '" & FastTime1 & " ' SET @MA2='" & FastTime2 & "' execute sp_LongMA @MA1, @MA2, @MA = @MA OUTPUT Again, it runs with no errors, but also with no indication of a returned value. How do I write the @MA OUTPUT (the average) to a variable that I can access thru VB6? I set up an ADODB.Recordset in VB, call the sproc as above and get no errors, but I cannot figure out what to look for in the returned recordset to get the value of @MA. TIA, Mark Rider _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From theoden11 at attbi.com Sat May 3 21:57:06 2003 From: theoden11 at attbi.com (Mark Rider) Date: Sat, 3 May 2003 21:57:06 -0500 Subject: [dba-SQLServer]Sproc Output to VB? In-Reply-To: <000001c311e1$55192190$b5310cd8@hargrove.internal> Message-ID: <000a01c311e8$d8cb8fd0$0a147f0a@c893163a> Thanks for the advice Doris. I have changed the sproc and it runs in QA - although there is no value returned to the grid view. I still cannot seem to figure out the correct name to read in the recordset. If I look for rs_Fast("@MA") I get a "Item cannot be found in the collection" error and any other name I try comes up with the same. And I thought datetime storage and retrieval was a bear! -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mike and Doris Manning Sent: Saturday, May 03, 2003 9:03 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Sproc Output to VB? You haven't set @MA to anything so it is returning nothing. Try the following... CREATE PROCEDURE [sp_LongMA] @inparam datetime, @inparam2 datetime, @MA money OUTPUT AS Select @MA = Avg (QQQValue) From tblQQQ Where (QQQTime BETWEEN @inparam AND @inparam2) GO Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark Rider Sent: Saturday, May 03, 2003 9:44 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer]Sproc Output to VB? I have gone stupid looking for the answer to this. I have a sproc that calculates an average of several numbers, and runs fine in QA. I cannot figure out how to capture the output of the sproc so I can display it in anything other than QA, MSQuery, etc. The sproc is: CREATE PROCEDURE [sp_LongMA] @inparam datetime, @inparam2 datetime, @MA money OUTPUT AS Select Avg (QQQValue) AS MovingAverage From tblQQQ Where (QQQTime BETWEEN @inparam AND @inparam2) GO I call it from VB6 like so: ssql_Fast = DECLARE @MA1 datetime DECLARE @MA2 datetime DECLARE @MA money SET @MA1 = '" & FastTime1 & " ' SET @MA2='" & FastTime2 & "' execute sp_LongMA @MA1, @MA2, @MA = @MA OUTPUT Again, it runs with no errors, but also with no indication of a returned value. How do I write the @MA OUTPUT (the average) to a variable that I can access thru VB6? I set up an ADODB.Recordset in VB, call the sproc as above and get no errors, but I cannot figure out what to look for in the returned recordset to get the value of @MA. TIA, Mark Rider _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From fhtapia at hotmail.com Sun May 4 00:12:57 2003 From: fhtapia at hotmail.com (Francisco Tapia) Date: Sat, 3 May 2003 22:12:57 -0700 Subject: [dba-SQLServer]Iif equivalent References: <005a01c311b2$61af38b0$d5ecffcc@SusanOne> Message-ID: No offense Susan but you really ought to read the chapter in Martin's and Your book specifically the chapter on writing sprocs... for Sql Server there is NO Iif as in Access' Immediate If statement, but you could acheive the same results using a case statement. You could also expand the abilities of your sproc by using a user defined function, but because that runs for every single row of the returned data it will run slower (typically) than a case statement, look up "Case" and "User Defined Function" in BOL, read that sproc chapter from your book Sql From Access to Sql Server... again no offense... :o) -Francisco http://rcm.netfirms.com/ On Saturday, May 03, 2003 1:27 PM [GMT -8], Susan Harkins wrote: : I'm looking for an equivalent to Access' Iif() function -- can't seem : to find anything -- is there one? In Access, you can use a quick : expression in the form : : Iif(field=whatever,value,value) : : in a query to determine a field's content -- can you do the same in : SQL Server? : : Susan H. : : From accessd at shaw.ca Sun May 4 02:11:55 2003 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Sun, 04 May 2003 00:11:55 -0700 Subject: [dba-SQLServer]Sproc Output to VB? In-Reply-To: <000a01c311e8$d8cb8fd0$0a147f0a@c893163a> Message-ID: Hi Mark: Have you got the right parameter code to receive the call back information? Something like this: objCmd.Parameters.Append .CreateParameter("@intCompanyCode", adInteger, adParamInput, , lngCompanyCode) objCmd.Parameters.Append .CreateParameter("@intRecords", adInteger, adParamOutput) After the SP is executed the information is returned in an array: varRecordValue = objCmd(1) HTH Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Mark Rider Sent: Saturday, May 03, 2003 7:57 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Sproc Output to VB? Thanks for the advice Doris. I have changed the sproc and it runs in QA - although there is no value returned to the grid view. I still cannot seem to figure out the correct name to read in the recordset. If I look for rs_Fast("@MA") I get a "Item cannot be found in the collection" error and any other name I try comes up with the same. And I thought datetime storage and retrieval was a bear! -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mike and Doris Manning Sent: Saturday, May 03, 2003 9:03 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Sproc Output to VB? You haven't set @MA to anything so it is returning nothing. Try the following... CREATE PROCEDURE [sp_LongMA] @inparam datetime, @inparam2 datetime, @MA money OUTPUT AS Select @MA = Avg (QQQValue) From tblQQQ Where (QQQTime BETWEEN @inparam AND @inparam2) GO Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark Rider Sent: Saturday, May 03, 2003 9:44 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer]Sproc Output to VB? I have gone stupid looking for the answer to this. I have a sproc that calculates an average of several numbers, and runs fine in QA. I cannot figure out how to capture the output of the sproc so I can display it in anything other than QA, MSQuery, etc. The sproc is: CREATE PROCEDURE [sp_LongMA] @inparam datetime, @inparam2 datetime, @MA money OUTPUT AS Select Avg (QQQValue) AS MovingAverage From tblQQQ Where (QQQTime BETWEEN @inparam AND @inparam2) GO I call it from VB6 like so: ssql_Fast = DECLARE @MA1 datetime DECLARE @MA2 datetime DECLARE @MA money SET @MA1 = '" & FastTime1 & " ' SET @MA2='" & FastTime2 & "' execute sp_LongMA @MA1, @MA2, @MA = @MA OUTPUT Again, it runs with no errors, but also with no indication of a returned value. How do I write the @MA OUTPUT (the average) to a variable that I can access thru VB6? I set up an ADODB.Recordset in VB, call the sproc as above and get no errors, but I cannot figure out what to look for in the returned recordset to get the value of @MA. TIA, Mark Rider _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From harkins at iglou.com Sun May 4 08:14:38 2003 From: harkins at iglou.com (Susan Harkins) Date: Sun, 4 May 2003 09:14:38 -0400 Subject: [dba-SQLServer]Iif equivalent References: <005a01c311b2$61af38b0$d5ecffcc@SusanOne> Message-ID: <00f901c3123f$cf225840$d3e6ffcc@SusanOne> Well, I did look around first -- but when I couldn't find anything on an If function, I realized it probably didn't exist for SQL Server and that's why I asked. I can't read Martin's part of the book -- I don't read Irish! ;) Susan H. > No offense Susan but you really ought to read the chapter in Martin's and From theoden11 at attbi.com Sun May 4 09:35:38 2003 From: theoden11 at attbi.com (Mark Rider) Date: Sun, 4 May 2003 09:35:38 -0500 Subject: [dba-SQLServer]Sproc Output to VB? In-Reply-To: Message-ID: <000201c3124a$6e668c00$0a147f0a@c893163a> Thanks Jim, that was the missing link! I finally have what I need to start working on the really big sproc! -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence (AccessD) Sent: Sunday, May 04, 2003 2:12 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Sproc Output to VB? Hi Mark: Have you got the right parameter code to receive the call back information? Something like this: objCmd.Parameters.Append .CreateParameter("@intCompanyCode", adInteger, adParamInput, , lngCompanyCode) objCmd.Parameters.Append .CreateParameter("@intRecords", adInteger, adParamOutput) After the SP is executed the information is returned in an array: varRecordValue = objCmd(1) HTH Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Mark Rider Sent: Saturday, May 03, 2003 7:57 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Sproc Output to VB? Thanks for the advice Doris. I have changed the sproc and it runs in QA - although there is no value returned to the grid view. I still cannot seem to figure out the correct name to read in the recordset. If I look for rs_Fast("@MA") I get a "Item cannot be found in the collection" error and any other name I try comes up with the same. And I thought datetime storage and retrieval was a bear! -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mike and Doris Manning Sent: Saturday, May 03, 2003 9:03 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Sproc Output to VB? You haven't set @MA to anything so it is returning nothing. Try the following... CREATE PROCEDURE [sp_LongMA] @inparam datetime, @inparam2 datetime, @MA money OUTPUT AS Select @MA = Avg (QQQValue) From tblQQQ Where (QQQTime BETWEEN @inparam AND @inparam2) GO Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark Rider Sent: Saturday, May 03, 2003 9:44 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer]Sproc Output to VB? I have gone stupid looking for the answer to this. I have a sproc that calculates an average of several numbers, and runs fine in QA. I cannot figure out how to capture the output of the sproc so I can display it in anything other than QA, MSQuery, etc. The sproc is: CREATE PROCEDURE [sp_LongMA] @inparam datetime, @inparam2 datetime, @MA money OUTPUT AS Select Avg (QQQValue) AS MovingAverage From tblQQQ Where (QQQTime BETWEEN @inparam AND @inparam2) GO I call it from VB6 like so: ssql_Fast = DECLARE @MA1 datetime DECLARE @MA2 datetime DECLARE @MA money SET @MA1 = '" & FastTime1 & " ' SET @MA2='" & FastTime2 & "' execute sp_LongMA @MA1, @MA2, @MA = @MA OUTPUT Again, it runs with no errors, but also with no indication of a returned value. How do I write the @MA OUTPUT (the average) to a variable that I can access thru VB6? I set up an ADODB.Recordset in VB, call the sproc as above and get no errors, but I cannot figure out what to look for in the returned recordset to get the value of @MA. TIA, Mark Rider _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From sgeller at cce.umn.edu Mon May 5 09:53:54 2003 From: sgeller at cce.umn.edu (Susan Geller) Date: Mon, 5 May 2003 09:53:54 -0500 Subject: [dba-SQLServer]OT: New Name (cross posted) Message-ID: > For those of you who know who I am, I just wanted to let you know that > I changed my name from Susan Zeller to Susan Geller on 4/27 when I got > married. So, when you see "Geller", don't think typo. I married > someone with the last name of Gellerman and we made up the last name > of Geller as a way of having a shared name. Wedding was awesome and > we are in total married bliss. > > --Susan > > > Susan B. Geller > Office of Information Systems > College of Continuing Education > University of Minnesota > 306 Wesbrook Hall > 77 Pleasant Street SE > Minneapolis, MN 55455 > Phone: 612-626-4785 > Fax: 612-625-2568 > > From CWortz at tea.state.tx.us Mon May 5 10:11:41 2003 From: CWortz at tea.state.tx.us (Wortz, Charles) Date: Mon, 5 May 2003 10:11:41 -0500 Subject: [dba-SQLServer]OT: New Name (cross posted) Message-ID: Congratulations! May you two have a long and prosperous life together. Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: Susan Geller [mailto:sgeller at cce.umn.edu] Sent: Monday 2003 May 05 09:54 To: dba-SQLServer at databaseadvisors.com; accessd at databaseadvisors.com Subject: [dba-SQLServer]OT: New Name (cross posted) > For those of you who know who I am, I just wanted to let you know that > I changed my name from Susan Zeller to Susan Geller on 4/27 when I got > married. So, when you see "Geller", don't think typo. I married > someone with the last name of Gellerman and we made up the last name > of Geller as a way of having a shared name. Wedding was awesome and > we are in total married bliss. > > --Susan > > > Susan B. Geller > Office of Information Systems > College of Continuing Education > University of Minnesota > 306 Wesbrook Hall > 77 Pleasant Street SE > Minneapolis, MN 55455 > Phone: 612-626-4785 > Fax: 612-625-2568 From my.lists at verizon.net Mon May 5 10:42:00 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Mon, 5 May 2003 08:42:00 -0700 Subject: [dba-SQLServer]OT: New Name (cross posted) References: Message-ID: <002d01c3131c$dede2ba0$b615010a@FHTAPIA> tooooo funny!, that's exactly what I thought.. Typ-o. I didn't know you could make up a last name when you got married. Is that just a state thing or is that nation wide... (thinking why didn't I change my name to something new ;o)) -Francisco http://rcm.netfirms.com On Monday, May 05, 2003 7:53 AM [GMT-8], Susan Geller wrote: :: For those of you who know who I am, I just wanted to let you know :: that I changed my name from Susan Zeller to Susan Geller on 4/27 :: when I got married. So, when you see "Geller", don't think typo. I :: married someone with the last name of Gellerman and we made up the :: last name of Geller as a way of having a shared name. Wedding was :: awesome and we are in total married bliss. :: :: --Susan :: :: :: Susan B. Geller :: Office of Information Systems :: College of Continuing Education :: University of Minnesota :: 306 Wesbrook Hall :: 77 Pleasant Street SE :: Minneapolis, MN 55455 :: Phone: 612-626-4785 :: Fax: 612-625-2568 :: :: : _______________________________________________ : dba-SQLServer mailing list : dba-SQLServer at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-sqlserver : http://www.databaseadvisors.com From CWortz at tea.state.tx.us Mon May 5 10:57:37 2003 From: CWortz at tea.state.tx.us (Wortz, Charles) Date: Mon, 5 May 2003 10:57:37 -0500 Subject: [dba-SQLServer]OT: New Name (cross posted) Message-ID: Francisco, In the United States almost anyone can legally change their name for almost any reason. In many of the states all that you have to do is fill out the proper forms, pay the proper fees, and affirm that you are not changing your name to hide from your creditors or the law. Check with your local courthouse or a local lawyer on the details in your state. Are you thinking of changing your last name to Tapioca? Or maybe Tap? Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: Francisco H Tapia [mailto:my.lists at verizon.net] Sent: Monday 2003 May 05 10:42 To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer]OT: New Name (cross posted) tooooo funny!, that's exactly what I thought.. Typ-o. I didn't know you could make up a last name when you got married. Is that just a state thing or is that nation wide... (thinking why didn't I change my name to something new ;o)) -Francisco http://rcm.netfirms.com From my.lists at verizon.net Mon May 5 11:15:33 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Mon, 5 May 2003 09:15:33 -0700 Subject: [dba-SQLServer]OT: New Name (cross posted) References: Message-ID: <005c01c31321$8ea01450$b615010a@FHTAPIA> Naw, more like Gates, or Jobs ;o) -Francisco http://rcm.netfirms.com On Monday, May 05, 2003 8:57 AM [GMT-8], Wortz, Charles wrote: : Francisco, : : In the United States almost anyone can legally change their name for : almost any reason. In many of the states all that you have to do is : fill out the proper forms, pay the proper fees, and affirm that you : are not changing your name to hide from your creditors or the law. : Check with your local courthouse or a local lawyer on the details in : your state. : : Are you thinking of changing your last name to Tapioca? Or : maybe Tap? : : Charles Wortz : Software Development Division : Texas Education Agency : 1701 N. Congress Ave : Austin, TX 78701-1494 : 512-463-9493 : CWortz at tea.state.tx.us : : : : -----Original Message----- : From: Francisco H Tapia [mailto:my.lists at verizon.net] : Sent: Monday 2003 May 05 10:42 : To: dba-sqlserver at databaseadvisors.com : Subject: Re: [dba-SQLServer]OT: New Name (cross posted) : : : tooooo funny!, that's exactly what I thought.. Typ-o. I didn't know : you could make up a last name when you got married. Is that just a : state thing or is that nation wide... (thinking why didn't I change : my name to something new ;o)) : : -Francisco : http://rcm.netfirms.com : _______________________________________________ : dba-SQLServer mailing list : dba-SQLServer at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-sqlserver : http://www.databaseadvisors.com From artful at rogers.com Mon May 5 11:48:43 2003 From: artful at rogers.com (Arthur Fuller) Date: Mon, 5 May 2003 12:48:43 -0400 Subject: [dba-SQLServer]OT: New Name (cross posted) In-Reply-To: <005c01c31321$8ea01450$b615010a@FHTAPIA> Message-ID: <018901c31326$3038ce20$8e01a8c0@Rock> Don't be so hasty, I think Francisco Tapioca has a real nice ring to it. A. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco H Tapia Sent: May 5, 2003 12:16 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer]OT: New Name (cross posted) Naw, more like Gates, or Jobs ;o) -Francisco http://rcm.netfirms.com On Monday, May 05, 2003 8:57 AM [GMT-8], Wortz, Charles wrote: : Francisco, : : In the United States almost anyone can legally change their name for : almost any reason. In many of the states all that you have to do is : fill out the proper forms, pay the proper fees, and affirm that you : are not changing your name to hide from your creditors or the law. : Check with your local courthouse or a local lawyer on the details in : your state. : : Are you thinking of changing your last name to Tapioca? Or : maybe Tap? : : Charles Wortz : Software Development Division : Texas Education Agency : 1701 N. Congress Ave : Austin, TX 78701-1494 : 512-463-9493 : CWortz at tea.state.tx.us : : : : -----Original Message----- : From: Francisco H Tapia [mailto:my.lists at verizon.net] : Sent: Monday 2003 May 05 10:42 : To: dba-sqlserver at databaseadvisors.com : Subject: Re: [dba-SQLServer]OT: New Name (cross posted) : : : tooooo funny!, that's exactly what I thought.. Typ-o. I didn't know : you could make up a last name when you got married. Is that just a : state thing or is that nation wide... (thinking why didn't I change : my name to something new ;o)) : : -Francisco : http://rcm.netfirms.com : _______________________________________________ : dba-SQLServer mailing list : dba-SQLServer at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-sqlserver : http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From CWortz at tea.state.tx.us Mon May 5 11:58:10 2003 From: CWortz at tea.state.tx.us (Wortz, Charles) Date: Mon, 5 May 2003 11:58:10 -0500 Subject: [dba-SQLServer]OT: New Name (cross posted) Message-ID: Or maybe Franc on Tap? Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Monday 2003 May 05 11:49 To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]OT: New Name (cross posted) Don't be so hasty, I think Francisco Tapioca has a real nice ring to it. A. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco H Tapia Sent: May 5, 2003 12:16 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer]OT: New Name (cross posted) Naw, more like Gates, or Jobs ;o) -Francisco http://rcm.netfirms.com On Monday, May 05, 2003 8:57 AM [GMT-8], Wortz, Charles wrote: : Francisco, : : In the United States almost anyone can legally change their name for : almost any reason. In many of the states all that you have to do is : fill out the proper forms, pay the proper fees, and affirm that you : are not changing your name to hide from your creditors or the law. : Check with your local courthouse or a local lawyer on the details in : your state. : : Are you thinking of changing your last name to Tapioca? Or : maybe Tap? : : Charles Wortz : Software Development Division : Texas Education Agency : 1701 N. Congress Ave : Austin, TX 78701-1494 : 512-463-9493 : CWortz at tea.state.tx.us : : : : -----Original Message----- : From: Francisco H Tapia [mailto:my.lists at verizon.net] : Sent: Monday 2003 May 05 10:42 : To: dba-sqlserver at databaseadvisors.com : Subject: Re: [dba-SQLServer]OT: New Name (cross posted) : : : tooooo funny!, that's exactly what I thought.. Typ-o. I didn't know : you could make up a last name when you got married. Is that just a : state thing or is that nation wide... (thinking why didn't I change : my name to something new ;o)) : : -Francisco : http://rcm.netfirms.com : _______________________________________________ : dba-SQLServer mailing list : dba-SQLServer at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-sqlserver : http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Mon May 5 12:39:45 2003 From: artful at rogers.com (Arthur Fuller) Date: Mon, 5 May 2003 13:39:45 -0400 Subject: [dba-SQLServer]UNION Columns? In-Reply-To: Message-ID: <019c01c3132d$51618ef0$8e01a8c0@Rock> I'm working on an app that could have used some normalization smarts in its gestation, to be gentle. There are no less than 6 nearly identical tables, with dozens of columns. I want to resolve them all into a single table called Persons, and then from there break out their addresses (gak! There are multiple embedded addresses in each of the six tables; I'm gonna blow chunks in a minute :-) etc. What I want right now is a SELECT statement that will give me the column names and types etc. as rows from each table. Then I can UNION them and lose all the duplicates and then create my Persons table and append all the rows from the 6 tables. I took a look at syscolumns but I don't really understand it. Can anyone offer a sample query that lists the columns for a specified table? A. From sgeller at cce.umn.edu Mon May 5 12:50:07 2003 From: sgeller at cce.umn.edu (Susan Geller) Date: Mon, 5 May 2003 12:50:07 -0500 Subject: [dba-SQLServer]OT: New Name (cross posted) Message-ID: Actually, we had a bit of a problem with our name change. In Minnesota, you can apply for a marriage license in any county regardless of where you live or where you are going to marry. We applied in Hennepin County (Minneapolis) because the office was convenient even though we live in Ramsely County (St. Paul). In Hennepin County you can't change your name directly on the marriage application. In Ramsey County you can. We found that out AFTER we got married. So, we have to actually go through the process Charles describes below to get our names changed. So, legally, our last names haven't changed yet to Geller -- that will take a couple of months of bureaucracy. But, we call ourselves Geller as of 4/27. --Susan -----Original Message----- From: Wortz, Charles [mailto:CWortz at tea.state.tx.us] Sent: Monday, May 05, 2003 10:58 AM To: dba-sqlserver at databaseadvisors.com; AccessD at databaseadvisors.com Subject: RE: [dba-SQLServer]OT: New Name (cross posted) Francisco, In the United States almost anyone can legally change their name for almost any reason. In many of the states all that you have to do is fill out the proper forms, pay the proper fees, and affirm that you are not changing your name to hide from your creditors or the law. Check with your local courthouse or a local lawyer on the details in your state. Are you thinking of changing your last name to Tapioca? Or maybe Tap? Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: Francisco H Tapia [mailto:my.lists at verizon.net] Sent: Monday 2003 May 05 10:42 To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer]OT: New Name (cross posted) tooooo funny!, that's exactly what I thought.. Typ-o. I didn't know you could make up a last name when you got married. Is that just a state thing or is that nation wide... (thinking why didn't I change my name to something new ;o)) -Francisco http://rcm.netfirms.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From tuxedo_man at hotmail.com Mon May 5 13:11:11 2003 From: tuxedo_man at hotmail.com (Billy Pang) Date: Mon, 05 May 2003 18:11:11 +0000 Subject: [dba-SQLServer]UNION Columns? Message-ID: select table_name, column_name, data_type from information_schema.columns; HTH Billy >From: "Arthur Fuller" >Reply-To: dba-sqlserver at databaseadvisors.com >To: >Subject: [dba-SQLServer]UNION Columns? >Date: Mon, 5 May 2003 13:39:45 -0400 > >I'm working on an app that could have used some normalization smarts in its >gestation, to be gentle. There are no less than 6 nearly identical tables, >with dozens of columns. I want to resolve them all into a single table >called Persons, and then from there break out their addresses (gak! There >are multiple embedded addresses in each of the six tables; I'm gonna blow >chunks in a minute :-) etc. > >What I want right now is a SELECT statement that will give me the column >names and types etc. as rows from each table. Then I can UNION them and >lose >all the duplicates and then create my Persons table and append all the rows >from the 6 tables. I took a look at syscolumns but I don't really >understand >it. > >Can anyone offer a sample query that lists the columns for a specified >table? > >A. > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From CWortz at tea.state.tx.us Mon May 5 13:17:44 2003 From: CWortz at tea.state.tx.us (Wortz, Charles) Date: Mon, 5 May 2003 13:17:44 -0500 Subject: [dba-SQLServer]RE: [AccessD] OT: New Name (Cross posted) Message-ID: Susan, Is it safe to assume that the taller of the two young ladies in white dresses is you? And is the gentleman in the cumberbund/vest Chris? Anyway, again Mazel Tov! May you two have a long and prosperous life together. Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: Susan Geller [mailto:sgeller at cce.umn.edu] Sent: Monday 2003 May 05 12:54 To: accessd at databaseadvisors.com Subject: RE: [AccessD] OT: New Name (Cross posted) Importance: Low Thanks to all for the congratulations and good wishes. Preliminary thumbnail pictures are at www.thegellers.org. Genealogists will most definitely be confused. --Susan -----Original Message----- From: Reische, Brenda L. [mailto:reische at mdh.org] Sent: Monday, May 05, 2003 12:32 PM To: 'accessd at databaseadvisors.com' Subject: RE: [AccessD] OT: New Name (Cross posted) Congratulations!!! I think that combining & changing both your names is very innovative! (You may stump a few genealogists, though!!) Where are the pics?? Brenda Reische Application Support Analyst McDonough District Hospital -----Original Message----- From: Susan Geller [mailto:sgeller at cce.umn.edu] Sent: Monday, May 05, 2003 10:17 AM To: accessd at databaseadvisors.com Subject: [AccessD] OT: New Name (Cross posted) For those of you who know who I am, I just wanted to let you know that I changed my name from Susan Zeller to Susan Geller on 4/27 when I got married. So, when you see "Geller", don't think typo. I married someone with the last name of Gellerman and we made up the last name of Geller as a way of having a shared name. Wedding was awesome and we are in total married bliss. --Susan Susan B. Geller Office of Information Systems College of Continuing Education University of Minnesota 306 Wesbrook Hall 77 Pleasant Street SE Minneapolis, MN 55455 Phone: 612-626-4785 Fax: 612-625-2568 _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From artful at rogers.com Mon May 5 13:52:07 2003 From: artful at rogers.com (Arthur Fuller) Date: Mon, 5 May 2003 14:52:07 -0400 Subject: [dba-SQLServer]UNION Columns? In-Reply-To: Message-ID: <01a401c31337$6d48c340$8e01a8c0@Rock> That works well, and thank you for that. Just one more question (actually two): where to get the column size and where to get the NOT NULL or whatever? A. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Billy Pang Sent: May 5, 2003 2:11 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer]UNION Columns? select table_name, column_name, data_type from information_schema.columns; HTH Billy From sgeller at cce.umn.edu Mon May 5 13:53:35 2003 From: sgeller at cce.umn.edu (Susan Geller) Date: Mon, 5 May 2003 13:53:35 -0500 Subject: [dba-SQLServer]RE: [AccessD] OT: New Name (Cross posted) Message-ID: Yes, I'm the taller of white dress wearers. The other is my oldest niece. And, the vest wearer is my now husband Chris. In some of the pics, the boy Chris is with is my nephew. My niece and nephew did an awesome job walking flowers down the aisle and enjoyed getting to dress up! --Susan -----Original Message----- From: Wortz, Charles [mailto:CWortz at tea.state.tx.us] Sent: Monday, May 05, 2003 1:18 PM To: accessd at databaseadvisors.com; dba-SQLServer Subject: [dba-SQLServer]RE: [AccessD] OT: New Name (Cross posted) Susan, Is it safe to assume that the taller of the two young ladies in white dresses is you? And is the gentleman in the cumberbund/vest Chris? Anyway, again Mazel Tov! May you two have a long and prosperous life together. Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: Susan Geller [mailto:sgeller at cce.umn.edu] Sent: Monday 2003 May 05 12:54 To: accessd at databaseadvisors.com Subject: RE: [AccessD] OT: New Name (Cross posted) Importance: Low Thanks to all for the congratulations and good wishes. Preliminary thumbnail pictures are at www.thegellers.org. Genealogists will most definitely be confused. --Susan -----Original Message----- From: Reische, Brenda L. [mailto:reische at mdh.org] Sent: Monday, May 05, 2003 12:32 PM To: 'accessd at databaseadvisors.com' Subject: RE: [AccessD] OT: New Name (Cross posted) Congratulations!!! I think that combining & changing both your names is very innovative! (You may stump a few genealogists, though!!) Where are the pics?? Brenda Reische Application Support Analyst McDonough District Hospital -----Original Message----- From: Susan Geller [mailto:sgeller at cce.umn.edu] Sent: Monday, May 05, 2003 10:17 AM To: accessd at databaseadvisors.com Subject: [AccessD] OT: New Name (Cross posted) For those of you who know who I am, I just wanted to let you know that I changed my name from Susan Zeller to Susan Geller on 4/27 when I got married. So, when you see "Geller", don't think typo. I married someone with the last name of Gellerman and we made up the last name of Geller as a way of having a shared name. Wedding was awesome and we are in total married bliss. --Susan Susan B. Geller Office of Information Systems College of Continuing Education University of Minnesota 306 Wesbrook Hall 77 Pleasant Street SE Minneapolis, MN 55455 Phone: 612-626-4785 Fax: 612-625-2568 _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From sgeller at cce.umn.edu Mon May 5 13:58:00 2003 From: sgeller at cce.umn.edu (Susan Geller) Date: Mon, 5 May 2003 13:58:00 -0500 Subject: [dba-SQLServer]UNION Columns? Message-ID: select table_name, column_name, data_type, is_nullable, character_maximum_length from information_schema.columns; Try a select * to see what other goodies you can get! --Susan -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Monday, May 05, 2003 1:52 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]UNION Columns? That works well, and thank you for that. Just one more question (actually two): where to get the column size and where to get the NOT NULL or whatever? A. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Billy Pang Sent: May 5, 2003 2:11 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer]UNION Columns? select table_name, column_name, data_type from information_schema.columns; HTH Billy _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Mon May 5 14:36:08 2003 From: artful at rogers.com (Arthur Fuller) Date: Mon, 5 May 2003 15:36:08 -0400 Subject: [dba-SQLServer]UNION Columns? In-Reply-To: Message-ID: <01ac01c3133d$93ce75e0$8e01a8c0@Rock> Ok recently married smartypants :-), how would I turn the resultset into a create table statement? BTW, I love your idea of both persons changing names. Unfortunately, I didn't at the time have your nerve. I married a woman whose surname is Ruskin (c.f. John Ruskin; they are related and I read everything he wrote long before meeting Samantha). And I wanted to change my name to Ruskin but copped out at the last moment :-( Given your algorithm, this might have led to: A) fullskin (nah, don't wanna go there) B) ruskler (sounds like some a cattle thief) The aforementioned John was the principal champion of Turner, my fave painter in the world. I shoulda just grabbed her name and been done with it. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Susan Geller Sent: May 5, 2003 2:58 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]UNION Columns? select table_name, column_name, data_type, is_nullable, character_maximum_length from information_schema.columns; Try a select * to see what other goodies you can get! --Susan -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Monday, May 05, 2003 1:52 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]UNION Columns? That works well, and thank you for that. Just one more question (actually two): where to get the column size and where to get the NOT NULL or whatever? A. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Billy Pang Sent: May 5, 2003 2:11 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer]UNION Columns? select table_name, column_name, data_type from information_schema.columns; HTH Billy _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From sgeller at cce.umn.edu Mon May 5 15:15:56 2003 From: sgeller at cce.umn.edu (Susan Geller) Date: Mon, 5 May 2003 15:15:56 -0500 Subject: [dba-SQLServer]UNION Columns? Message-ID: Re the create table: just like you would with anything else: create procedure dbo.MySproc as if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[MyTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[MyTable] Create table dbo.Mytable ([table_name] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [column_name] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , etc for rest of fields ) Select table_name, column_name, etc >From information_schema.columns Go Re the name: The algorithm definitely doesn't work for all names. No matter the change, it's a brave thing to do and I can certainly understand how a person would cop out. It's been hard for me and I'm the one who is expected to change my name and the change is only one letter! --Susan -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Monday, May 05, 2003 2:36 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]UNION Columns? Ok recently married smartypants :-), how would I turn the resultset into a create table statement? BTW, I love your idea of both persons changing names. Unfortunately, I didn't at the time have your nerve. I married a woman whose surname is Ruskin (c.f. John Ruskin; they are related and I read everything he wrote long before meeting Samantha). And I wanted to change my name to Ruskin but copped out at the last moment :-( Given your algorithm, this might have led to: A) fullskin (nah, don't wanna go there) B) ruskler (sounds like some a cattle thief) The aforementioned John was the principal champion of Turner, my fave painter in the world. I shoulda just grabbed her name and been done with it. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Susan Geller Sent: May 5, 2003 2:58 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]UNION Columns? select table_name, column_name, data_type, is_nullable, character_maximum_length from information_schema.columns; Try a select * to see what other goodies you can get! --Susan -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Monday, May 05, 2003 1:52 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]UNION Columns? That works well, and thank you for that. Just one more question (actually two): where to get the column size and where to get the NOT NULL or whatever? A. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Billy Pang Sent: May 5, 2003 2:11 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer]UNION Columns? select table_name, column_name, data_type from information_schema.columns; HTH Billy _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From CWortz at tea.state.tx.us Mon May 5 10:11:41 2003 From: CWortz at tea.state.tx.us (Wortz, Charles) Date: Mon, 5 May 2003 10:11:41 -0500 Subject: [dba-SQLServer]OT: New Name (cross posted) Message-ID: Congratulations! May you two have a long and prosperous life together. Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: Susan Geller [mailto:sgeller at cce.umn.edu] Sent: Monday 2003 May 05 09:54 To: dba-SQLServer at databaseadvisors.com; accessd at databaseadvisors.com Subject: [dba-SQLServer]OT: New Name (cross posted) > For those of you who know who I am, I just wanted to let you know that > I changed my name from Susan Zeller to Susan Geller on 4/27 when I got > married. So, when you see "Geller", don't think typo. I married > someone with the last name of Gellerman and we made up the last name > of Geller as a way of having a shared name. Wedding was awesome and > we are in total married bliss. > > --Susan > > > Susan B. Geller > Office of Information Systems > College of Continuing Education > University of Minnesota > 306 Wesbrook Hall > 77 Pleasant Street SE > Minneapolis, MN 55455 > Phone: 612-626-4785 > Fax: 612-625-2568 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From subs at solution-providers.ie Tue May 6 05:43:10 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Tue, 6 May 2003 11:43:10 +0100 Subject: [dba-SQLServer]Sproc Output to VB? References: <000201c3124a$6e668c00$0a147f0a@c893163a> Message-ID: <003901c313bd$23341b70$46ff869f@D8TZHN0J> Hello Guys, In relation to this, I have asked the list previously, but do you find that using commands and using OutPut parameters are arkward? I try to avoid using output params if possible, also, I have been recently using simple recordsets to run action sp's with nice tidy results. It means that the parameters are loosely typed, but I am happy enough with it, any comments ? Mark ----- Original Message ----- From: "Mark Rider" To: Sent: Sunday, May 04, 2003 3:35 PM Subject: RE: [dba-SQLServer]Sproc Output to VB? > Thanks Jim, that was the missing link! > > I finally have what I need to start working on the really big sproc! > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > (AccessD) > Sent: Sunday, May 04, 2003 2:12 AM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > Hi Mark: > > Have you got the right parameter code to receive the call back information? > Something like this: > > objCmd.Parameters.Append .CreateParameter("@intCompanyCode", adInteger, > adParamInput, , lngCompanyCode) objCmd.Parameters.Append > .CreateParameter("@intRecords", adInteger, > adParamOutput) > > After the SP is executed the information is returned in an array: > > varRecordValue = objCmd(1) > > HTH > Jim > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Mark Rider > Sent: Saturday, May 03, 2003 7:57 PM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > Thanks for the advice Doris. I have changed the sproc and it runs in QA - > although there is no value returned to the grid view. > > I still cannot seem to figure out the correct name to read in the recordset. If > I look for rs_Fast("@MA") I get a "Item cannot be found in the collection" error > and any other name I try comes up with the same. > > And I thought datetime storage and retrieval was a bear! > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mike and Doris > Manning > Sent: Saturday, May 03, 2003 9:03 PM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > You haven't set @MA to anything so it is returning nothing. Try the following... > > CREATE PROCEDURE [sp_LongMA] > @inparam datetime, > @inparam2 datetime, > @MA money OUTPUT > AS > Select @MA = Avg (QQQValue) From tblQQQ > Where (QQQTime BETWEEN @inparam AND @inparam2) > GO > > Doris Manning > Database Administrator > Hargrove Inc. > www.hargroveinc.com > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark Rider > Sent: Saturday, May 03, 2003 9:44 PM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer]Sproc Output to VB? > > > I have gone stupid looking for the answer to this. I have a sproc that > calculates an average of several numbers, and runs fine in QA. I cannot figure > out how to capture the output of the sproc so I can display it in anything other > than QA, MSQuery, etc. > > The sproc is: > CREATE PROCEDURE [sp_LongMA] > @inparam datetime, > @inparam2 datetime, > @MA money OUTPUT > AS > Select Avg (QQQValue) AS MovingAverage From tblQQQ > Where (QQQTime BETWEEN @inparam AND @inparam2) > GO > > I call it from VB6 like so: > > ssql_Fast = > DECLARE @MA1 datetime > DECLARE @MA2 datetime > DECLARE @MA money > > SET @MA1 = '" & FastTime1 & " ' > SET @MA2='" & FastTime2 & "' > execute sp_LongMA @MA1, @MA2, @MA = @MA OUTPUT > > Again, it runs with no errors, but also with no indication of a returned value. > > How do I write the @MA OUTPUT (the average) to a variable that I can access thru > VB6? I set up an ADODB.Recordset in VB, call the sproc as above and get no > errors, but I cannot figure out what to look for in the returned recordset to > get the value of @MA. > > TIA, > > Mark Rider > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > From mikedorism at ntelos.net Tue May 6 07:28:30 2003 From: mikedorism at ntelos.net (Mike and Doris Manning) Date: Tue, 6 May 2003 08:28:30 -0400 Subject: [dba-SQLServer]Sproc Output to VB? In-Reply-To: <003901c313bd$23341b70$46ff869f@D8TZHN0J> Message-ID: <000001c313cb$0469fe90$2a3a0cd8@hargrove.internal> It all becomes a question of which side you want to handle the bulk of the processing. By using recordsets, all processing happens on the CLIENT side. By using output parameters, all processing happens on the SERVER side. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark L. Breen Sent: Tuesday, May 06, 2003 6:43 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer]Sproc Output to VB? Hello Guys, In relation to this, I have asked the list previously, but do you find that using commands and using OutPut parameters are arkward? I try to avoid using output params if possible, also, I have been recently using simple recordsets to run action sp's with nice tidy results. It means that the parameters are loosely typed, but I am happy enough with it, any comments ? Mark ----- Original Message ----- From: "Mark Rider" To: Sent: Sunday, May 04, 2003 3:35 PM Subject: RE: [dba-SQLServer]Sproc Output to VB? > Thanks Jim, that was the missing link! > > I finally have what I need to start working on the really big sproc! > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > (AccessD) > Sent: Sunday, May 04, 2003 2:12 AM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > Hi Mark: > > Have you got the right parameter code to receive the call back information? > Something like this: > > objCmd.Parameters.Append .CreateParameter("@intCompanyCode", > adInteger, adParamInput, , lngCompanyCode) objCmd.Parameters.Append > .CreateParameter("@intRecords", adInteger, > adParamOutput) > > After the SP is executed the information is returned in an array: > > varRecordValue = objCmd(1) > > HTH > Jim > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Mark > Rider > Sent: Saturday, May 03, 2003 7:57 PM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > Thanks for the advice Doris. I have changed the sproc and it runs in > QA - although there is no value returned to the grid view. > > I still cannot seem to figure out the correct name to read in the recordset. If > I look for rs_Fast("@MA") I get a "Item cannot be found in the > collection" error > and any other name I try comes up with the same. > > And I thought datetime storage and retrieval was a bear! > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mike > and Doris > Manning > Sent: Saturday, May 03, 2003 9:03 PM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > You haven't set @MA to anything so it is returning nothing. Try the following... > > CREATE PROCEDURE [sp_LongMA] > @inparam datetime, > @inparam2 datetime, > @MA money OUTPUT > AS > Select @MA = Avg (QQQValue) From tblQQQ > Where (QQQTime BETWEEN @inparam AND @inparam2) > GO > > Doris Manning > Database Administrator > Hargrove Inc. > www.hargroveinc.com > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark Rider > Sent: Saturday, May 03, 2003 9:44 PM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer]Sproc Output to VB? > > > I have gone stupid looking for the answer to this. I have a sproc > that calculates an average of several numbers, and runs fine in QA. I > cannot figure > out how to capture the output of the sproc so I can display it in > anything other > than QA, MSQuery, etc. > > The sproc is: > CREATE PROCEDURE [sp_LongMA] > @inparam datetime, > @inparam2 datetime, > @MA money OUTPUT > AS > Select Avg (QQQValue) AS MovingAverage From tblQQQ > Where (QQQTime BETWEEN @inparam AND @inparam2) > GO > > I call it from VB6 like so: > > ssql_Fast = > DECLARE @MA1 datetime > DECLARE @MA2 datetime > DECLARE @MA money > > SET @MA1 = '" & FastTime1 & " ' > SET @MA2='" & FastTime2 & "' > execute sp_LongMA @MA1, @MA2, @MA = @MA OUTPUT > > Again, it runs with no errors, but also with no indication of a > returned value. > > How do I write the @MA OUTPUT (the average) to a variable that I can access thru > VB6? I set up an ADODB.Recordset in VB, call the sproc as above and get no > errors, but I cannot figure out what to look for in the returned > recordset to > get the value of @MA. > > TIA, > > Mark Rider > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From Robert.Djabarov at usaa.com Tue May 6 09:15:05 2003 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Tue, 6 May 2003 09:15:05 -0500 Subject: [dba-SQLServer]Sproc Output to VB? Message-ID: <5A31F89EC4C79B49B5030FF2EF58E9D202DABFB1@ex02.eagle.usaa.com> It is not necessarily such a clear cut. I don't use output params at all, but rather return the result of action queries in the form of a recordset (1 row 1 column). All processing logic sits on the server. Robert Djabarov Senior SQL Server DBA USAA IT/DBMS ? (210) 913-3148 - phone ? (210) 753-3148 - pager -----Original Message----- From: Mike and Doris Manning [mailto:mikedorism at ntelos.net] Sent: Tuesday, May 06, 2003 7:29 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Sproc Output to VB? It all becomes a question of which side you want to handle the bulk of the processing. By using recordsets, all processing happens on the CLIENT side. By using output parameters, all processing happens on the SERVER side. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark L. Breen Sent: Tuesday, May 06, 2003 6:43 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer]Sproc Output to VB? Hello Guys, In relation to this, I have asked the list previously, but do you find that using commands and using OutPut parameters are arkward? I try to avoid using output params if possible, also, I have been recently using simple recordsets to run action sp's with nice tidy results. It means that the parameters are loosely typed, but I am happy enough with it, any comments ? Mark ----- Original Message ----- From: "Mark Rider" To: Sent: Sunday, May 04, 2003 3:35 PM Subject: RE: [dba-SQLServer]Sproc Output to VB? > Thanks Jim, that was the missing link! > > I finally have what I need to start working on the really big sproc! > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > (AccessD) > Sent: Sunday, May 04, 2003 2:12 AM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > Hi Mark: > > Have you got the right parameter code to receive the call back information? > Something like this: > > objCmd.Parameters.Append .CreateParameter("@intCompanyCode", > adInteger, adParamInput, , lngCompanyCode) objCmd.Parameters.Append > .CreateParameter("@intRecords", adInteger, > adParamOutput) > > After the SP is executed the information is returned in an array: > > varRecordValue = objCmd(1) > > HTH > Jim > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Mark > Rider > Sent: Saturday, May 03, 2003 7:57 PM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > Thanks for the advice Doris. I have changed the sproc and it runs in > QA - although there is no value returned to the grid view. > > I still cannot seem to figure out the correct name to read in the recordset. If > I look for rs_Fast("@MA") I get a "Item cannot be found in the > collection" error > and any other name I try comes up with the same. > > And I thought datetime storage and retrieval was a bear! > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mike > and Doris > Manning > Sent: Saturday, May 03, 2003 9:03 PM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > You haven't set @MA to anything so it is returning nothing. Try the following... > > CREATE PROCEDURE [sp_LongMA] > @inparam datetime, > @inparam2 datetime, > @MA money OUTPUT > AS > Select @MA = Avg (QQQValue) From tblQQQ > Where (QQQTime BETWEEN @inparam AND @inparam2) > GO > > Doris Manning > Database Administrator > Hargrove Inc. > www.hargroveinc.com > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark Rider > Sent: Saturday, May 03, 2003 9:44 PM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer]Sproc Output to VB? > > > I have gone stupid looking for the answer to this. I have a sproc > that calculates an average of several numbers, and runs fine in QA. I > cannot figure > out how to capture the output of the sproc so I can display it in > anything other > than QA, MSQuery, etc. > > The sproc is: > CREATE PROCEDURE [sp_LongMA] > @inparam datetime, > @inparam2 datetime, > @MA money OUTPUT > AS > Select Avg (QQQValue) AS MovingAverage From tblQQQ > Where (QQQTime BETWEEN @inparam AND @inparam2) > GO > > I call it from VB6 like so: > > ssql_Fast = > DECLARE @MA1 datetime > DECLARE @MA2 datetime > DECLARE @MA money > > SET @MA1 = '" & FastTime1 & " ' > SET @MA2='" & FastTime2 & "' > execute sp_LongMA @MA1, @MA2, @MA = @MA OUTPUT > > Again, it runs with no errors, but also with no indication of a > returned value. > > How do I write the @MA OUTPUT (the average) to a variable that I can access thru > VB6? I set up an ADODB.Recordset in VB, call the sproc as above and get no > errors, but I cannot figure out what to look for in the returned > recordset to > get the value of @MA. > > TIA, > > Mark Rider > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Tue May 6 11:19:06 2003 From: artful at rogers.com (Arthur Fuller) Date: Tue, 6 May 2003 12:19:06 -0400 Subject: [dba-SQLServer]Sproc Output to VB? In-Reply-To: <5A31F89EC4C79B49B5030FF2EF58E9D202DABFB1@ex02.eagle.usaa.com> Message-ID: <027e01c313eb$37aa3610$8e01a8c0@Rock> I too find it too cumbersome to write all that front end code that creates a command object and bla bla bla bla bla. When I need something back, typically I write a UDF that returns either a scalar value or a table, depending on how many values I need back. The more I use UDFs the more I love them. Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Djabarov, Robert Sent: May 6, 2003 10:15 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Sproc Output to VB? It is not necessarily such a clear cut. I don't use output params at all, but rather return the result of action queries in the form of a recordset (1 row 1 column). All processing logic sits on the server. Robert Djabarov Senior SQL Server DBA USAA IT/DBMS ? (210) 913-3148 - phone ? (210) 753-3148 - pager -----Original Message----- From: Mike and Doris Manning [mailto:mikedorism at ntelos.net] Sent: Tuesday, May 06, 2003 7:29 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Sproc Output to VB? It all becomes a question of which side you want to handle the bulk of the processing. By using recordsets, all processing happens on the CLIENT side. By using output parameters, all processing happens on the SERVER side. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark L. Breen Sent: Tuesday, May 06, 2003 6:43 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer]Sproc Output to VB? Hello Guys, In relation to this, I have asked the list previously, but do you find that using commands and using OutPut parameters are arkward? I try to avoid using output params if possible, also, I have been recently using simple recordsets to run action sp's with nice tidy results. It means that the parameters are loosely typed, but I am happy enough with it, any comments ? Mark ----- Original Message ----- From: "Mark Rider" To: Sent: Sunday, May 04, 2003 3:35 PM Subject: RE: [dba-SQLServer]Sproc Output to VB? > Thanks Jim, that was the missing link! > > I finally have what I need to start working on the really big sproc! > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > (AccessD) > Sent: Sunday, May 04, 2003 2:12 AM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > Hi Mark: > > Have you got the right parameter code to receive the call back information? > Something like this: > > objCmd.Parameters.Append .CreateParameter("@intCompanyCode", > adInteger, adParamInput, , lngCompanyCode) objCmd.Parameters.Append > .CreateParameter("@intRecords", adInteger, > adParamOutput) > > After the SP is executed the information is returned in an array: > > varRecordValue = objCmd(1) > > HTH > Jim > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Mark > Rider > Sent: Saturday, May 03, 2003 7:57 PM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > Thanks for the advice Doris. I have changed the sproc and it runs in > QA - although there is no value returned to the grid view. > > I still cannot seem to figure out the correct name to read in the recordset. If > I look for rs_Fast("@MA") I get a "Item cannot be found in the > collection" error > and any other name I try comes up with the same. > > And I thought datetime storage and retrieval was a bear! > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mike > and Doris > Manning > Sent: Saturday, May 03, 2003 9:03 PM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > You haven't set @MA to anything so it is returning nothing. Try the following... > > CREATE PROCEDURE [sp_LongMA] > @inparam datetime, > @inparam2 datetime, > @MA money OUTPUT > AS > Select @MA = Avg (QQQValue) From tblQQQ > Where (QQQTime BETWEEN @inparam AND @inparam2) > GO > > Doris Manning > Database Administrator > Hargrove Inc. > www.hargroveinc.com > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark Rider > Sent: Saturday, May 03, 2003 9:44 PM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer]Sproc Output to VB? > > > I have gone stupid looking for the answer to this. I have a sproc > that calculates an average of several numbers, and runs fine in QA. I > cannot figure > out how to capture the output of the sproc so I can display it in > anything other > than QA, MSQuery, etc. > > The sproc is: > CREATE PROCEDURE [sp_LongMA] > @inparam datetime, > @inparam2 datetime, > @MA money OUTPUT > AS > Select Avg (QQQValue) AS MovingAverage From tblQQQ > Where (QQQTime BETWEEN @inparam AND @inparam2) > GO > > I call it from VB6 like so: > > ssql_Fast = > DECLARE @MA1 datetime > DECLARE @MA2 datetime > DECLARE @MA money > > SET @MA1 = '" & FastTime1 & " ' > SET @MA2='" & FastTime2 & "' > execute sp_LongMA @MA1, @MA2, @MA = @MA OUTPUT > > Again, it runs with no errors, but also with no indication of a > returned value. > > How do I write the @MA OUTPUT (the average) to a variable that I can access thru > VB6? I set up an ADODB.Recordset in VB, call the sproc as above and get no > errors, but I cannot figure out what to look for in the returned > recordset to > get the value of @MA. > > TIA, > > Mark Rider > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From DavidL at sierranevada.com Tue May 6 11:45:52 2003 From: DavidL at sierranevada.com (David Lewis) Date: Tue, 6 May 2003 09:45:52 -0700 Subject: [dba-SQLServer]UDFs Message-ID: <229F7C29573CC4479A3313CC55B096541BC8A7@pale.sierranevada.com> UDFs are something I simply have been unable to wrap my mind around. I guess they are a new tool that I have always gotten along without. Does anybody have any recommendations for a good, VERY PRACTICAL book or tutorial on them? Anybody have any examples close at hand that demonstrate how useful they are? TIA D. Lewis > > > ------------------------------ > > Message: 5 > Date: Tue, 6 May 2003 12:19:06 -0400 > From: "Arthur Fuller" > Subject: RE: [dba-SQLServer]Sproc Output to VB? > To: > Message-ID: <027e01c313eb$37aa3610$8e01a8c0 at Rock> > Content-Type: text/plain; charset="US-ASCII" > > I too find it too cumbersome to write all that front end code > that creates a > command object and bla bla bla bla bla. When I need something back, > typically I write a UDF that returns either a scalar value or a table, > depending on how many values I need back. The more I use UDFs > the more I > love them. > > Arthur > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf > Of Djabarov, > Robert > Sent: May 6, 2003 10:15 AM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > It is not necessarily such a clear cut. I don't use output > params at all, > but rather return the result of action queries in the form of > a recordset (1 > row 1 column). All processing logic sits on the server. > > Robert Djabarov > Senior SQL Server DBA > USAA IT/DBMS > ? (210) 913-3148 - phone > ? (210) 753-3148 - pager > > From sgeller at cce.umn.edu Tue May 6 11:49:39 2003 From: sgeller at cce.umn.edu (Susan Geller) Date: Tue, 6 May 2003 11:49:39 -0500 Subject: [dba-SQLServer]UDFs Message-ID: Actually, the stuff in BOL is really comprehensive. Make sure you have the updated BOL file and if not download it from MS page. The main benefit that I have found from UDF's is that they return a recordset that can be referenced as a table. I use these in sprocs where I need to pass the input parameter through to another query that is involved in my sproc. For example you can do this: Create proc mySproc @param1 varchar(10) Select * from MyUDF(@param1) Go --Susan -----Original Message----- From: David Lewis [mailto:DavidL at sierranevada.com] Sent: Tuesday, May 06, 2003 11:46 AM To: 'dba-sqlserver at databaseadvisors.com' Subject: [dba-SQLServer]UDFs UDFs are something I simply have been unable to wrap my mind around. I guess they are a new tool that I have always gotten along without. Does anybody have any recommendations for a good, VERY PRACTICAL book or tutorial on them? Anybody have any examples close at hand that demonstrate how useful they are? TIA D. Lewis > > > ------------------------------ > > Message: 5 > Date: Tue, 6 May 2003 12:19:06 -0400 > From: "Arthur Fuller" > Subject: RE: [dba-SQLServer]Sproc Output to VB? > To: > Message-ID: <027e01c313eb$37aa3610$8e01a8c0 at Rock> > Content-Type: text/plain; charset="US-ASCII" > > I too find it too cumbersome to write all that front end code > that creates a > command object and bla bla bla bla bla. When I need something back, > typically I write a UDF that returns either a scalar value or a table, > depending on how many values I need back. The more I use UDFs > the more I > love them. > > Arthur > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf > Of Djabarov, > Robert > Sent: May 6, 2003 10:15 AM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > It is not necessarily such a clear cut. I don't use output > params at all, > but rather return the result of action queries in the form of > a recordset (1 > row 1 column). All processing logic sits on the server. > > Robert Djabarov > Senior SQL Server DBA > USAA IT/DBMS > ? (210) 913-3148 - phone > ? (210) 753-3148 - pager > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From harkins at iglou.com Tue May 6 12:57:45 2003 From: harkins at iglou.com (Susan Harkins) Date: Tue, 6 May 2003 13:57:45 -0400 Subject: [dba-SQLServer]UDFs References: <229F7C29573CC4479A3313CC55B096541BC8A7@pale.sierranevada.com> Message-ID: <009001c313f9$98cb7180$9fe6ffcc@SusanOne> http://builder.com.com/article.jhtml?id=u00320020206rsh01.htm http://builder.com.com/article.jhtml?id=u00320020307rsh01.htm Short intro articles. Susan H. > UDFs are something I simply have been unable to wrap my mind around. I > guess they are a new tool that I have always gotten along without. Does > anybody have any recommendations for a good, VERY PRACTICAL book or tutorial > on them? Anybody have any examples close at hand that demonstrate how > useful they are? > > TIA D. Lewis > > > > > > > ------------------------------ > > > > Message: 5 > > Date: Tue, 6 May 2003 12:19:06 -0400 > > From: "Arthur Fuller" > > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > To: > > Message-ID: <027e01c313eb$37aa3610$8e01a8c0 at Rock> > > Content-Type: text/plain; charset="US-ASCII" > > > > I too find it too cumbersome to write all that front end code > > that creates a > > command object and bla bla bla bla bla. When I need something back, > > typically I write a UDF that returns either a scalar value or a table, > > depending on how many values I need back. The more I use UDFs > > the more I > > love them. > > > > Arthur > > > > -----Original Message----- > > From: dba-sqlserver-bounces at databaseadvisors.com > > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf > > Of Djabarov, > > Robert > > Sent: May 6, 2003 10:15 AM > > To: dba-sqlserver at databaseadvisors.com > > Subject: RE: [dba-SQLServer]Sproc Output to VB? > > > > > > It is not necessarily such a clear cut. I don't use output > > params at all, > > but rather return the result of action queries in the form of > > a recordset (1 > > row 1 column). All processing logic sits on the server. > > > > Robert Djabarov > > Senior SQL Server DBA > > USAA IT/DBMS > > ? (210) 913-3148 - phone > > ? (210) 753-3148 - pager > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > > From harkins at iglou.com Tue May 6 19:15:32 2003 From: harkins at iglou.com (Susan Harkins) Date: Tue, 6 May 2003 20:15:32 -0400 Subject: [dba-SQLServer]IsNull Message-ID: <027b01c3142d$c843b470$9fe6ffcc@SusanOne> Does anyone know how long IsNull's been around -- forever? Or is it new to 2000 -- I only have 2000 installed. Susan H. From andrew.haslett at ilc.gov.au Tue May 6 20:30:12 2003 From: andrew.haslett at ilc.gov.au (Haslett, Andrew) Date: Wed, 7 May 2003 11:00:12 +0930 Subject: [dba-SQLServer]IsNull Message-ID: Pretty sure its been around for a while. There's also COALESCE() which seems to be preferred these days.. Cheers, Andrew -----Original Message----- From: Susan Harkins [mailto:harkins at iglou.com] Sent: Wednesday, 7 May 2003 9:46 AM To: SQLList Subject: [dba-SQLServer]IsNull Does anyone know how long IsNull's been around -- forever? Or is it new to 2000 -- I only have 2000 installed. Susan H. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. From stuart at lexacorp.com.pg Tue May 6 21:58:34 2003 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 07 May 2003 12:58:34 +1000 Subject: [dba-SQLServer]IsNull In-Reply-To: Message-ID: <3EB902FA.8946.132D0DB@localhost> Both IsNull and Coalesce are in SQL 7 T-SQL Help and are not listed as new functions so they must have been in 6.5 at least. On 7 May 2003 at 11:00, Haslett, Andrew wrote: > Pretty sure its been around for a while. There's also COALESCE() > which seems to be preferred these days.. > > Cheers, > Andrew > > -----Original Message----- > From: Susan Harkins [mailto:harkins at iglou.com] > Sent: Wednesday, 7 May 2003 9:46 AM > To: SQLList > Subject: [dba-SQLServer]IsNull > > > Does anyone know how long IsNull's been around -- forever? Or is it > new to 2000 -- I only have 2000 installed. > > Susan H. > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > IMPORTANT - PLEASE READ ******************** > This email and any files transmitted with it are confidential and may > contain information protected by law from disclosure. If you have > received this message in error, please notify the sender immediately > and delete this email from your system. No warranty is given that this > email or files, if attached to this email, are free from computer > viruses or other defects. They are provided on the basis the user > assumes all responsibility for loss, damage or consequence resulting > directly or indirectly from their use, whether caused by the > negligence of the sender or not. > _______________________________________________ dba-SQLServer mailing > list dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > -- Lexacorp Ltd http://www.lexacorp.com.pg Information Technology Consultancy, Software Development,System Support. From harkins at iglou.com Tue May 6 22:08:32 2003 From: harkins at iglou.com (Susan Harkins) Date: Tue, 6 May 2003 23:08:32 -0400 Subject: [dba-SQLServer]IsNull References: <3EB902FA.8946.132D0DB@localhost> Message-ID: <000c01c31445$f2a3b5e0$e4e6ffcc@SusanOne> That helps -- thanks! ;) Susan H. > Both IsNull and Coalesce are in SQL 7 T-SQL Help and are not listed > as new functions so they must have been in 6.5 at least. > From davide at dalyn.co.nz Tue May 6 22:29:59 2003 From: davide at dalyn.co.nz (David Emerson) Date: Wed, 07 May 2003 15:29:59 +1200 Subject: [dba-SQLServer]ADP form based on 1-to-many SQL statement Message-ID: <5.2.0.9.0.20030507151242.00b41068@mail.dalyn.co.nz> In A97 I had a form which was based on an SQL which joined three tables. I was able to change any field from any of the tables. Now in SQL2000 I am not. Reading A2002 Enterprise Developers handbook (Litwin, Getz, Gunderloy) pg 280 they say that Fields on forms based on a one-to-many join represented as a SQL statement are updateable in a SQL2000 database, regardless of which table contains the field. So I am trying to find out what I am doing wrong. I have set the unique table to the many table. The resynch command has been done. If I make the table based on only one table it works ok, but not on more than one. I don't want to change the form to a form/subform structure if I can help it because it is already a subform of another form (although I am just trying to get it working on its own at the moment) and it would only add extra complication for the users (currently the full structure has two columns of fields that the user compares, updates fields, and then decides which column to commit to the database). Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 From davide at dalyn.co.nz Wed May 7 14:46:33 2003 From: davide at dalyn.co.nz (David Emerson) Date: Thu, 08 May 2003 07:46:33 +1200 Subject: [dba-SQLServer]ADP form based on 1-to-many SQL statement Message-ID: <5.2.0.9.0.20030508074507.025dee30@mail.dalyn.co.nz> Further to my note last night - Here is the SQL from the view that I am using - SELECT DISTINCT tblCustomers.TradingName END AS CustName, tblCustomers.Residential, tblCustICP.ICPNumber, tblCustICP.AllocationGrp, tblCustomers.PAddress1, tblCustomers.PAddress2, tblCustomers.PSuburb, tblCustomers.PCity, tblCustomers.PPostCode, tblCustICP.GateIDNo, tblCustMeter.MeterNo, tblCustMeter.MeterModelIDNo, tblCustMeter.Location, tblCustMeter.NoOfDials, tblCustMeter.DigitsRead, tblCustMeter.Pressure, tblCustMeter.LastYrConsumption, tblCustMeter.DateMeterLastRead, tblCustMeter.OldRetLastMeterRead, tblCustMeter.ActualEstimateOld, tblCustMeter.OldRetailMultiplier, tblCustMeter.InstallID, tblCustMeter.DateMeterInfoRecd, tblCustMeter.LastMeterReadDate, tblCustMeter.LastMeterReading, tblCustMeter.MthEstimateUse, tblCustMeter.PressureKPA, tblCustMeter.PressureFactor, tblCustMeter.Corrector, tblCustMeter.MeterMult, tblCustMeter.ConversionFactor, tblCustMeter.NextMeterReadDate, tblCustMeter.ConxnNRDDate, tblCustomers.AccStatus, tblCustomers.InvNumber, tblCustomers.CurrentBillDate, tblCustomers.CustomerID FROM tblCustomers INNER JOIN (tblCustICP INNER JOIN tblCustMeter ON tblCustICP.ICPID = tblCustMeter.ICPIDNo) ON tblCustomers.CustomerID = tblCustICP.CustIDNo Any suggestions? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 From artful at rogers.com Wed May 7 15:25:10 2003 From: artful at rogers.com (Arthur Fuller) Date: Wed, 7 May 2003 16:25:10 -0400 Subject: [dba-SQLServer]ADP form based on 1-to-many SQL statement In-Reply-To: <5.2.0.9.0.20030508074507.025dee30@mail.dalyn.co.nz> Message-ID: <03e701c314d6$c2063750$8e01a8c0@Rock> Send me the CREATE TABLE statements for the relevant tables off-list and I'll begin experimenting. Even better would be a few INSERT statements to populate them with a row or three each. Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: May 7, 2003 3:47 PM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer]ADP form based on 1-to-many SQL statement Further to my note last night - Here is the SQL from the view that I am using - SELECT DISTINCT tblCustomers.TradingName END AS CustName, tblCustomers.Residential, tblCustICP.ICPNumber, tblCustICP.AllocationGrp, tblCustomers.PAddress1, tblCustomers.PAddress2, tblCustomers.PSuburb, tblCustomers.PCity, tblCustomers.PPostCode, tblCustICP.GateIDNo, tblCustMeter.MeterNo, tblCustMeter.MeterModelIDNo, tblCustMeter.Location, tblCustMeter.NoOfDials, tblCustMeter.DigitsRead, tblCustMeter.Pressure, tblCustMeter.LastYrConsumption, tblCustMeter.DateMeterLastRead, tblCustMeter.OldRetLastMeterRead, tblCustMeter.ActualEstimateOld, tblCustMeter.OldRetailMultiplier, tblCustMeter.InstallID, tblCustMeter.DateMeterInfoRecd, tblCustMeter.LastMeterReadDate, tblCustMeter.LastMeterReading, tblCustMeter.MthEstimateUse, tblCustMeter.PressureKPA, tblCustMeter.PressureFactor, tblCustMeter.Corrector, tblCustMeter.MeterMult, tblCustMeter.ConversionFactor, tblCustMeter.NextMeterReadDate, tblCustMeter.ConxnNRDDate, tblCustomers.AccStatus, tblCustomers.InvNumber, tblCustomers.CurrentBillDate, tblCustomers.CustomerID FROM tblCustomers INNER JOIN (tblCustICP INNER JOIN tblCustMeter ON tblCustICP.ICPID = tblCustMeter.ICPIDNo) ON tblCustomers.CustomerID = tblCustICP.CustIDNo Any suggestions? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From accessd at shaw.ca Wed May 7 16:51:28 2003 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Wed, 07 May 2003 14:51:28 -0700 Subject: [dba-SQLServer]RE: OT FTP problem In-Reply-To: <5.2.0.9.0.20030508074507.025dee30@mail.dalyn.co.nz> Message-ID: Hi All: We are having some problems connecting a Window 2000 server and an FTP site. If we connect to FTP through the standard port of 21, no problem but if we try to connect through a port other that 21 say for example 5003, the connection process fails. Has anyone had any experience or information with this process. Please answer off-line as this is an OT subject. MTIA Jim From tuxedo_man at hotmail.com Fri May 9 11:28:15 2003 From: tuxedo_man at hotmail.com (Billy Pang) Date: Fri, 09 May 2003 16:28:15 +0000 Subject: [dba-SQLServer]OT: *&^$*& PCMCIA Card Message-ID: Hello: Just wondering if anyone out there can help out here with a little hardware advice. I bought a PCMCIA card for my laptop (running on Win98) a few years ago, installed it and it has always worked well. Then I format my laptop with Win2k Server evaulation and the card does not work properly anymore (same laptop, same slot, same driver, just different OS). The sympton? It is *&*(&$% SLOW (must ping it with +3000 ms wait time to produce a response). Can anyone provide any advice? The card model is PCMPC200 from linksys. When I update the driver, it says something about not being digitally signed and thus the network adapter may not work properly. Do I need a new card just for Win2k Server evaluation? (As you have guessed it, I got the win2k server eval edition from the 70-215 exam of the ms curriculm. I can't complete any of the exercise because it requires two computers and the network card on my second computer is not working properly) Thanks in advance, Billy _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From stuart at pacific.net.hk Fri May 9 11:40:41 2003 From: stuart at pacific.net.hk (Stuart Sanders) Date: Sat, 10 May 2003 00:40:41 +0800 Subject: [dba-SQLServer]OT: *&^$*& PCMCIA Card References: Message-ID: <009601c31649$bb0115a0$c9ab11d2@bitswshome> If its a 10/100 card, try forcing it to 10 mbit rather than auto. I had a problem with a card in a win2k notebook a couple of years ago that worked fine on win9x. It wasn't until later that I "fixed" the problem by slowing the card down. A good 10 mbit connection is better than a nonexistant 100 mbit one. If you need help with that drop me an email and I'll try and give you instructions. Stuart ----- Original Message ----- From: "Billy Pang" To: Sent: Saturday, May 10, 2003 12:28 AM Subject: [dba-SQLServer]OT: *&^$*& PCMCIA Card > Hello: > > Just wondering if anyone out there can help out here with a little hardware > advice. > > I bought a PCMCIA card for my laptop (running on Win98) a few years ago, > installed it and it has always worked well. Then I format my laptop with > Win2k Server evaulation and the card does not work properly anymore (same > laptop, same slot, same driver, just different OS). The sympton? It is > *&*(&$% SLOW (must ping it with +3000 ms wait time to produce a response). > Can anyone provide any advice? The card model is PCMPC200 from linksys. > > When I update the driver, it says something about not being digitally signed > and thus the network adapter may not work properly. Do I need a new card > just for Win2k Server evaluation? > > (As you have guessed it, I got the win2k server eval edition from the 70-215 > exam of the ms curriculm. I can't complete any of the exercise because it > requires two computers and the network card on my second computer is not > working properly) > > Thanks in advance, > Billy > > _________________________________________________________________ > The new MSN 8: smart spam protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > From tuxedo_man at hotmail.com Sun May 11 13:38:47 2003 From: tuxedo_man at hotmail.com (Billy Pang) Date: Sun, 11 May 2003 18:38:47 +0000 Subject: [dba-SQLServer]OT: *&^$*& PCMCIA Card Message-ID: Thanks Stuart. I took your advice and my network card works now. My network card has about 15 settings and I tried changing them and somehow, by the luck of the draw, it works. Still not as a fast as it was before with Win98 but it will do. This exercise took a long time because everytime I change a setting on my network card it would not send or receive anything until I reboot my machine. Thanks again Billy >From: "Stuart Sanders" >Reply-To: dba-sqlserver at databaseadvisors.com >To: >Subject: Re: [dba-SQLServer]OT: *&^$*& PCMCIA Card >Date: Sat, 10 May 2003 00:40:41 +0800 > >If its a 10/100 card, try forcing it to 10 mbit rather than auto. I had a >problem with a card in a win2k notebook a couple of years ago that worked >fine on win9x. It wasn't until later that I "fixed" the problem by slowing >the card down. A good 10 mbit connection is better than a nonexistant 100 >mbit one. > >If you need help with that drop me an email and I'll try and give you >instructions. > >Stuart > > >----- Original Message ----- >From: "Billy Pang" >To: >Sent: Saturday, May 10, 2003 12:28 AM >Subject: [dba-SQLServer]OT: *&^$*& PCMCIA Card > > > > Hello: > > > > Just wondering if anyone out there can help out here with a little >hardware > > advice. > > > > I bought a PCMCIA card for my laptop (running on Win98) a few years ago, > > installed it and it has always worked well. Then I format my laptop >with > > Win2k Server evaulation and the card does not work properly anymore >(same > > laptop, same slot, same driver, just different OS). The sympton? It is > > *&*(&$% SLOW (must ping it with +3000 ms wait time to produce a >response). > > Can anyone provide any advice? The card model is PCMPC200 from linksys. > > > > When I update the driver, it says something about not being digitally >signed > > and thus the network adapter may not work properly. Do I need a new >card > > just for Win2k Server evaluation? > > > > (As you have guessed it, I got the win2k server eval edition from the >70-215 > > exam of the ms curriculm. I can't complete any of the exercise because >it > > requires two computers and the network card on my second computer is not > > working properly) > > > > Thanks in advance, > > Billy > > > > _________________________________________________________________ > > The new MSN 8: smart spam protection and 2 months FREE* > > http://join.msn.com/?page=features/junkmail > > > > _______________________________________________ > > dba-SQLServer mailing list > > dba-SQLServer at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > > http://www.databaseadvisors.com > > > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus From davide at dalyn.co.nz Sun May 11 20:42:39 2003 From: davide at dalyn.co.nz (David Emerson) Date: Mon, 12 May 2003 13:42:39 +1200 Subject: [dba-SQLServer]Qualifying Object Names Message-ID: <5.2.0.9.0.20030512133547.026d3c38@mail.dalyn.co.nz> Just a general question. Some books suggest that when writing code you should always qualify objects with the owner name (eg dbo.tblCustomers). How far should this be taken? Should I be doing this for every field in every sproc? or are there sets of guidlines? What benefits are there of including the owner name? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 From artful at rogers.com Mon May 12 07:16:00 2003 From: artful at rogers.com (Arthur Fuller) Date: Mon, 12 May 2003 08:16:00 -0400 Subject: [dba-SQLServer]Qualifying Object Names In-Reply-To: <5.2.0.9.0.20030512133547.026d3c38@mail.dalyn.co.nz> Message-ID: <00af01c31880$3fdfd4e0$8e01a8c0@Rock> The main reason you should qualify names is because other users will be accessing your stuff. Suppose you log on as 'sa' and then create some stuff. As sa, you can SELECT * FROM myTables and it will work. Should any other user issue the same command, it won't work. I got bitten by this problem in my first ADP project and learned my lesson quickly. So all record and row sources in my ADPs are now qualified. It is not necessary to qualify every single column name etc., however. A single reference will do, like so: SELECT Customers.CompanyName, Orders.OrderID FROM dbo.Customers INNER JOIN dbo.Orders ON Orders.CustomerID = Customers.CustomerID You should qualify sprocs, views, UDFs and tables. I do it out of habit now, even if I'm the only user of the given objects. A. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: May 11, 2003 9:43 PM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer]Qualifying Object Names Just a general question. Some books suggest that when writing code you should always qualify objects with the owner name (eg dbo.tblCustomers). How far should this be taken? Should I be doing this for every field in every sproc? or are there sets of guidlines? What benefits are there of including the owner name? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From Robert.Djabarov at usaa.com Mon May 12 10:19:35 2003 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Mon, 12 May 2003 10:19:35 -0500 Subject: [dba-SQLServer]Qualifying Object Names Message-ID: <5A31F89EC4C79B49B5030FF2EF58E9D24EBC0F@ex02.eagle.usaa.com> Actually, the main reason behind qualifying object names with schema owner is to eliminate the need for the optimizer to look for the same object under the schema name of the logged on user. Following MS best practices, all objects need to be created by SA. If that's the case, - the fact that others are going to use the objects does not require full schema qualification because after looking for the object of the schema owner of the logged on user the optimizer will look for the object created by the database owner. However, it is a good practice to always fully qualify object names with schema owner. Robert Djabarov Senior SQL Server DBA USAA IT/DBMS ? (210) 913-3148 - phone ? (210) 753-3148 - pager -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Monday, May 12, 2003 7:16 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Qualifying Object Names The main reason you should qualify names is because other users will be accessing your stuff. Suppose you log on as 'sa' and then create some stuff. As sa, you can SELECT * FROM myTables and it will work. Should any other user issue the same command, it won't work. I got bitten by this problem in my first ADP project and learned my lesson quickly. So all record and row sources in my ADPs are now qualified. It is not necessary to qualify every single column name etc., however. A single reference will do, like so: SELECT Customers.CompanyName, Orders.OrderID FROM dbo.Customers INNER JOIN dbo.Orders ON Orders.CustomerID = Customers.CustomerID You should qualify sprocs, views, UDFs and tables. I do it out of habit now, even if I'm the only user of the given objects. A. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: May 11, 2003 9:43 PM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer]Qualifying Object Names Just a general question. Some books suggest that when writing code you should always qualify objects with the owner name (eg dbo.tblCustomers). How far should this be taken? Should I be doing this for every field in every sproc? or are there sets of guidlines? What benefits are there of including the owner name? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Mon May 12 10:58:41 2003 From: artful at rogers.com (Arthur Fuller) Date: Mon, 12 May 2003 11:58:41 -0400 Subject: [dba-SQLServer]Qualifying Object Names In-Reply-To: <5A31F89EC4C79B49B5030FF2EF58E9D24EBC0F@ex02.eagle.usaa.com> Message-ID: <00e801c3189f$5bca7f10$8e01a8c0@Rock> Thanks for the clarification. From the pov of Access, though, I'm not 100% sure you are correct. I have had forms break because of unqualified record sources. As soon as I added the prefix "dbo.", said broken forms suddenly began working as expected. So what you say may apply to the back end, but I'm not entirely sure it applies to the Access ADP file (and perhaps other front ends). Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Djabarov, Robert Sent: May 12, 2003 11:20 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Qualifying Object Names Actually, the main reason behind qualifying object names with schema owner is to eliminate the need for the optimizer to look for the same object under the schema name of the logged on user. Following MS best practices, all objects need to be created by SA. If that's the case, - the fact that others are going to use the objects does not require full schema qualification because after looking for the object of the schema owner of the logged on user the optimizer will look for the object created by the database owner. However, it is a good practice to always fully qualify object names with schema owner. From Robert.Djabarov at usaa.com Mon May 12 12:27:02 2003 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Mon, 12 May 2003 12:27:02 -0500 Subject: [dba-SQLServer]Qualifying Object Names Message-ID: <5A31F89EC4C79B49B5030FF2EF58E9D202DABFBF@ex02.eagle.usaa.com> VB, ASP, ASPX, JSP work just fine the way I described. I guess Jet Engine is not there yet, huh?! :) Robert Djabarov Senior SQL Server DBA USAA IT/DBMS ? (210) 913-3148 - phone ? (210) 753-3148 - pager -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Monday, May 12, 2003 10:59 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Qualifying Object Names Thanks for the clarification. From the pov of Access, though, I'm not 100% sure you are correct. I have had forms break because of unqualified record sources. As soon as I added the prefix "dbo.", said broken forms suddenly began working as expected. So what you say may apply to the back end, but I'm not entirely sure it applies to the Access ADP file (and perhaps other front ends). Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Djabarov, Robert Sent: May 12, 2003 11:20 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Qualifying Object Names Actually, the main reason behind qualifying object names with schema owner is to eliminate the need for the optimizer to look for the same object under the schema name of the logged on user. Following MS best practices, all objects need to be created by SA. If that's the case, - the fact that others are going to use the objects does not require full schema qualification because after looking for the object of the schema owner of the logged on user the optimizer will look for the object created by the database owner. However, it is a good practice to always fully qualify object names with schema owner. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Tue May 13 07:51:16 2003 From: artful at rogers.com (Arthur Fuller) Date: Tue, 13 May 2003 08:51:16 -0400 Subject: [dba-SQLServer]Generate Insert Statements In-Reply-To: <5A31F89EC4C79B49B5030FF2EF58E9D202DABFBF@ex02.eagle.usaa.com> Message-ID: <019201c3194e$5d233dc0$8e01a8c0@Rock> While pondering how to write a sproc that would generate inserts, I came across this wonderful chunk of code that does everything we could want. Since it's a no-brainer to generate CREATE TABLE scripts, with this script in hand, any and all of us can quickly generate a script enabling fellow listers to create a database, the requisite tables, and some sample data. Thus complex questions can be posed, along with a script to recreate the gory details. Get the generate-insers script here: http://vyaskn.tripod.com/code/generate_inserts.txt. IMO it is a very slick hunk of T-SQL. Arthur From davide at dalyn.co.nz Tue May 13 19:33:06 2003 From: davide at dalyn.co.nz (David Emerson) Date: Wed, 14 May 2003 12:33:06 +1200 Subject: [dba-SQLServer]Deleting records SQL2000 AXP ADP Message-ID: <5.2.0.9.0.20030514122215.025e60c0@mail.dalyn.co.nz> I have some code which imports a spreadsheet into a table and then deletes some of the records which are summaries of the main records. The records are identified by having a null in the sixth field (or text "Last Date"). There is not a fixed number of record lines to delete. The code is as follows - DoCmd.RunSQL "DELETE FROM ttmpLoadAllocateImp" DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "ttmpLoadAllocateImp", Me!txtNGCAllocFile strSQL = "SELECT ttmpLoadAllocateImp.* FROM ttmpLoadAllocateImp" Set rstData = basRunDataObject(strSQL, adCmdText) 'Delete summary fields Do Until rstData.EOF If Nz(rstData.Fields(5), "Null") = "Null" Or Nz(rstData.Fields(5), "Null") = "Last Date" Then rstData.Delete <-----PROBLEM LINE End If rstData.MoveNext Loop rstData.Close Set rstData = Nothing When this is run I get an error -2147467259. "Key column information is insufficient or incorrect. Too many rows were affected by update". Can't find anything in Books On Line. My first questions is - Is this the correct way to delete lines in SQL? Second Question - What dooes the error mean? Third question - How can I fix it? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 From MarkBoyd at McBeeAssociates.com Wed May 14 07:21:06 2003 From: MarkBoyd at McBeeAssociates.com (Mark Boyd) Date: Wed, 14 May 2003 08:21:06 -0400 Subject: [dba-SQLServer]Deleting records SQL2000 AXP ADP Message-ID: David - I would use queries to delete the records. Try 'DELETE * FROM ttmpLoadAllocateImp WHERE (((Field5) Is Null)) OR (((Field5)="Last Date"))'. Mark Boyd Sr. Systems Analyst McBee Associates, Inc -----Original Message----- From: David Emerson [mailto:davide at dalyn.co.nz] Sent: Tuesday, May 13, 2003 8:33 PM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer]Deleting records SQL2000 AXP ADP I have some code which imports a spreadsheet into a table and then deletes some of the records which are summaries of the main records. The records are identified by having a null in the sixth field (or text "Last Date"). There is not a fixed number of record lines to delete. The code is as follows - DoCmd.RunSQL "DELETE FROM ttmpLoadAllocateImp" DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "ttmpLoadAllocateImp", Me!txtNGCAllocFile strSQL = "SELECT ttmpLoadAllocateImp.* FROM ttmpLoadAllocateImp" Set rstData = basRunDataObject(strSQL, adCmdText) 'Delete summary fields Do Until rstData.EOF If Nz(rstData.Fields(5), "Null") = "Null" Or Nz(rstData.Fields(5), "Null") = "Last Date" Then rstData.Delete <-----PROBLEM LINE End If rstData.MoveNext Loop rstData.Close Set rstData = Nothing When this is run I get an error -2147467259. "Key column information is insufficient or incorrect. Too many rows were affected by update". Can't find anything in Books On Line. My first questions is - Is this the correct way to delete lines in SQL? Second Question - What dooes the error mean? Third question - How can I fix it? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From subs at solution-providers.ie Tue May 13 08:53:41 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Tue, 13 May 2003 14:53:41 +0100 Subject: [dba-SQLServer]Generate Insert Statements References: <019201c3194e$5d233dc0$8e01a8c0@Rock> Message-ID: <000001c31a38$3614a800$329f7dc2@D8TZHN0J> Hello Arthur, Is that what I think it is? I have been considering writing a tool for a while that will concatenate onto the script that EM can generate that would repopulate my tables for me, especially with ones with the ID set to 0, At a glance, it looks like he has done it for us, Tks Mark ----- Original Message ----- From: "Arthur Fuller" To: Sent: Tuesday, May 13, 2003 1:51 PM Subject: [dba-SQLServer]Generate Insert Statements > While pondering how to write a sproc that would generate inserts, I came > across this wonderful chunk of code that does everything we could want. > Since it's a no-brainer to generate CREATE TABLE scripts, with this script > in hand, any and all of us can quickly generate a script enabling fellow > listers to create a database, the requisite tables, and some sample data. > Thus complex questions can be posed, along with a script to recreate the > gory details. > > Get the generate-insers script here: > http://vyaskn.tripod.com/code/generate_inserts.txt. IMO it is a very slick > hunk of T-SQL. > > Arthur > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From davide at dalyn.co.nz Thu May 15 00:13:36 2003 From: davide at dalyn.co.nz (David Emerson) Date: Thu, 15 May 2003 17:13:36 +1200 Subject: [dba-SQLServer]Deleting records SQL2000 AXP ADP In-Reply-To: Message-ID: <5.2.0.9.0.20030515171303.026505d0@mail.dalyn.co.nz> Thanks Mark. Works much better - simpler to! David At 14/05/2003, you wrote: >David - >I would use queries to delete the records. >Try 'DELETE * FROM ttmpLoadAllocateImp WHERE (((Field5) Is Null)) OR >(((Field5)="Last Date"))'. > >Mark Boyd >Sr. Systems Analyst >McBee Associates, Inc > > >-----Original Message----- >From: David Emerson [mailto:davide at dalyn.co.nz] >Sent: Tuesday, May 13, 2003 8:33 PM >To: dba-SQLServer at databaseadvisors.com >Subject: [dba-SQLServer]Deleting records SQL2000 AXP ADP > >I have some code which imports a spreadsheet into a table and then >deletes >some of the records which are summaries of the main records. The >records >are identified by having a null in the sixth field (or text "Last >Date"). There is not a fixed number of record lines to delete. The >code >is as follows - > > DoCmd.RunSQL "DELETE FROM ttmpLoadAllocateImp" > DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, >"ttmpLoadAllocateImp", Me!txtNGCAllocFile > strSQL = "SELECT ttmpLoadAllocateImp.* FROM ttmpLoadAllocateImp" > Set rstData = basRunDataObject(strSQL, adCmdText) > > 'Delete summary fields > Do Until rstData.EOF > If Nz(rstData.Fields(5), "Null") = "Null" Or >Nz(rstData.Fields(5), >"Null") = "Last Date" Then > rstData.Delete <-----PROBLEM LINE > End If > rstData.MoveNext > Loop > > rstData.Close > Set rstData = Nothing > >When this is run I get an error -2147467259. "Key column information is > >insufficient or incorrect. Too many rows were affected by update". >Can't >find anything in Books On Line. > >My first questions is - Is this the correct way to delete lines in SQL? > >Second Question - What dooes the error mean? > >Third question - How can I fix it? > >Regards > >David Emerson >DALYN Software Ltd >25b Cunliffe St, Johnsonville >Wellington, New Zealand >Ph/Fax (877) 456-1205 > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com From artful at rogers.com Thu May 15 07:50:55 2003 From: artful at rogers.com (Arthur Fuller) Date: Thu, 15 May 2003 08:50:55 -0400 Subject: [dba-SQLServer]Generate Insert Statements In-Reply-To: <000001c31a38$3614a800$329f7dc2@D8TZHN0J> Message-ID: <007f01c31ae0$9fd8ae00$8e01a8c0@Rock> Yup, that's what it is. Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark L. Breen Sent: May 13, 2003 9:54 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer]Generate Insert Statements Hello Arthur, Is that what I think it is? I have been considering writing a tool for a while that will concatenate onto the script that EM can generate that would repopulate my tables for me, especially with ones with the ID set to 0, At a glance, it looks like he has done it for us, Tks Mark ----- Original Message ----- From: "Arthur Fuller" To: Sent: Tuesday, May 13, 2003 1:51 PM Subject: [dba-SQLServer]Generate Insert Statements > While pondering how to write a sproc that would generate inserts, I > came across this wonderful chunk of code that does everything we could > want. Since it's a no-brainer to generate CREATE TABLE scripts, with > this script in hand, any and all of us can quickly generate a script > enabling fellow listers to create a database, the requisite tables, > and some sample data. Thus complex questions can be posed, along with > a script to recreate the gory details. > > Get the generate-insers script here: > http://vyaskn.tripod.com/code/generate_inserts.txt. IMO it is a very > slick hunk of T-SQL. > > Arthur From JRojas at tnco-inc.com Thu May 15 09:28:02 2003 From: JRojas at tnco-inc.com (Joe Rojas) Date: Thu, 15 May 2003 10:28:02 -0400 Subject: [dba-SQLServer]ADODB connection via ASP to SS7 Message-ID: <806536912C472E4A9D6515DF2E57261E0C5A5E@mercury.tnco-inc.com> Hi All, SS7 on Win2000 Server IIS4 on WinNT 4 Server I am trying to create an ASP page that makes a connection to a SS7 database using an ADODB Connection object. When I test the ASP page I get this error: Microsoft OLE DB Provider for SQL Server error '80040e4d' Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. How do I control what user the web server uses to connect to SS7? What I mean is that I did not anticipate ANONYMOUS LOGON to be used for the database access and would like to have the web server use a different NT login. Here is the code I am using in my ASP page: Dim OBJdbConnection Set OBJdbConnection = Server.CreateObject("ADODB.Connection") OBJdbConnection.ConnectionTimeout = 15 OBJdbConnection.CommandTimeout = 30 OBJdbConnection.Open "Provider=sqloledb;Data Source=SQLSERVER;Initial Catalog=TimeTracker;Integrated Security=SSPI" Thanks, Joe R. This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From Mwp.Reid at Queens-Belfast.AC.UK Thu May 15 11:06:26 2003 From: Mwp.Reid at Queens-Belfast.AC.UK (Mwp.Reid at Queens-Belfast.AC.UK) Date: Thu, 15 May 2003 17:06:26 +0100 (BST) Subject: [dba-SQLServer]ADODB connection via ASP to SS7 In-Reply-To: <806536912C472E4A9D6515DF2E57261E0C5A5E@mercury.tnco-inc.com> References: <806536912C472E4A9D6515DF2E57261E0C5A5E@mercury.tnco-inc.com> Message-ID: <1053014786.3ec3bb02eee53@hosea.qub.ac.uk> Create the ASP .net application as a user in SQL Server Martin Quoting Joe Rojas : > Hi All, > > SS7 on Win2000 Server > IIS4 on WinNT 4 Server > > I am trying to create an ASP page that makes a connection to a SS7 > database > using an ADODB Connection object. > > When I test the ASP page I get this error: > Microsoft OLE DB Provider for SQL Server error '80040e4d' > Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. > > How do I control what user the web server uses to connect to SS7? > What I mean is that I did not anticipate ANONYMOUS LOGON to be used for > the > database access and would like to have the web server use a different > NT > login. > > Here is the code I am using in my ASP page: > > Dim OBJdbConnection > Set OBJdbConnection = Server.CreateObject("ADODB.Connection") > OBJdbConnection.ConnectionTimeout = 15 > OBJdbConnection.CommandTimeout = 30 > OBJdbConnection.Open "Provider=sqloledb;Data Source=SQLSERVER;Initial > Catalog=TimeTracker;Integrated Security=SSPI" > > > Thanks, > Joe R. > > > > > This electronic transmission is strictly confidential to TNCO, Inc. > and > intended solely for the addressee. It may contain information which is > covered by legal, professional, or other privileges. If you are not > the > intended addressee, or someone authorized by the intended addressee to > receive transmissions on behalf of the addressee, you must not retain, > disclose in any form, copy, or take any action in reliance on this > transmission. If you have received this transmission in error, please > notify > the sender as soon as possible and destroy this message. While TNCO, > Inc. > uses virus protection, the recipient should check this email and any > attachments for the presence of viruses. TNCO, Inc. accepts no liability > for > any damage caused by any virus transmitted by this email. > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From MarkBoyd at McBeeAssociates.com Thu May 15 12:45:56 2003 From: MarkBoyd at McBeeAssociates.com (Mark Boyd) Date: Thu, 15 May 2003 13:45:56 -0400 Subject: [dba-SQLServer]Call another db from sproc Message-ID: Is there a way to reference DatabaseA from within a sproc on DatabaseB? We have a need to select data from a table in a different database. Thanks, Mark Boyd Sr. Systems Analyst McBee Associates, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From CWortz at tea.state.tx.us Thu May 15 12:58:41 2003 From: CWortz at tea.state.tx.us (Wortz, Charles) Date: Thu, 15 May 2003 12:58:41 -0500 Subject: [dba-SQLServer]Call another db from sproc Message-ID: Mark, It T-SQL you reference a table in another db using the IN clause in which you give the path name to the db containing the table. You should be able to find info about this in BOL. Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: Mark Boyd [mailto:MarkBoyd at McBeeAssociates.com] Sent: Thursday 2003 May 15 12:46 To: SQLServerList Subject: [dba-SQLServer]Call another db from sproc Is there a way to reference DatabaseA from within a sproc on DatabaseB? We have a need to select data from a table in a different database. Thanks, Mark Boyd Sr. Systems Analyst McBee Associates, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From MarkBoyd at McBeeAssociates.com Thu May 15 13:00:15 2003 From: MarkBoyd at McBeeAssociates.com (Mark Boyd) Date: Thu, 15 May 2003 14:00:15 -0400 Subject: [dba-SQLServer]Call another db from sproc Message-ID: Great! Thanks Charles. Mark -----Original Message----- From: Wortz, Charles [mailto:CWortz at tea.state.tx.us] Sent: Thursday, May 15, 2003 1:59 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Call another db from sproc Mark, It T-SQL you reference a table in another db using the IN clause in which you give the path name to the db containing the table. You should be able to find info about this in BOL. Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: Mark Boyd [mailto:MarkBoyd at McBeeAssociates.com] Sent: Thursday 2003 May 15 12:46 To: SQLServerList Subject: [dba-SQLServer]Call another db from sproc Is there a way to reference DatabaseA from within a sproc on DatabaseB? We have a need to select data from a table in a different database. Thanks, Mark Boyd Sr. Systems Analyst McBee Associates, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From my.lists at verizon.net Thu May 15 13:29:20 2003 From: my.lists at verizon.net (Francisco H Tapia) Date: Thu, 15 May 2003 11:29:20 -0700 Subject: [dba-SQLServer]Call another db from sproc References: Message-ID: <003801c31b0f$e6f37480$b615010a@FHTAPIA> You can do this in any part of the sproc, such as YourDBA.dbo.sprocName calls the following Select * From YourDBb.dbo.TableName or even Select * From Db_A.dbo.TableName AS A Inner Join Db_B.dbo.TableName AS B on A.CommonField = B.CommonField and as Charles suggested, check the BOL :o) HTH's -Francisco http://rcm.netfirms.com On Thursday, May 15, 2003 10:58 AM [GMT-8], Wortz, Charles wrote: : Mark, : : It T-SQL you reference a table in another db using the IN clause in : which you give the path name to the db containing the table. You : should be able to find info about this in BOL. : : : Charles Wortz : Software Development Division : Texas Education Agency : 1701 N. Congress Ave : Austin, TX 78701-1494 : 512-463-9493 : CWortz at tea.state.tx.us : : -----Original Message----- : From: Mark Boyd [mailto:MarkBoyd at McBeeAssociates.com] : Sent: Thursday 2003 May 15 12:46 : To: SQLServerList : Subject: [dba-SQLServer]Call another db from sproc : : : : Is there a way to reference DatabaseA from within a sproc on : DatabaseB? : : We have a need to select data from a table in a different database. : : : : Thanks, : : Mark Boyd : : Sr. Systems Analyst : : McBee Associates, Inc. : : : : : : : :: _______________________________________________ :: dba-SQLServer mailing list :: dba-SQLServer at databaseadvisors.com :: http://databaseadvisors.com/mailman/listinfo/dba-sqlserver :: http://www.databaseadvisors.com From Kenneth.Stoker at pnl.gov Thu May 15 17:13:30 2003 From: Kenneth.Stoker at pnl.gov (Stoker, Kenneth E) Date: Thu, 15 May 2003 15:13:30 -0700 Subject: [dba-SQLServer]Security Permissions on Views Message-ID: <249C1CB246997C48BB74963CCD361C1B07C871@pnlmse28.pnl.gov> We recently implemented a system trying to implement security at the view level. Upon deploying, it was discovered that security at the view level appeared to have no relevance. We ended up having to set permissions on the tables themselves. The vendor of the application stated that there was a bug in SQL Server that M$ had not fixed yet such that the permissions on view didn't work. Is this true? Ken Stoker Technology Commercialization Information Systems Administrator PH: (509) 375-3758 FAX: (509) 375-6731 E-mail: Kenneth.Stoker at pnl.gov From Robert.Djabarov at usaa.com Fri May 16 08:46:51 2003 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Fri, 16 May 2003 08:46:51 -0500 Subject: [dba-SQLServer]Security Permissions on Views Message-ID: <5A31F89EC4C79B49B5030FF2EF58E9D202DABFCE@ex02.eagle.usaa.com> Are your vendor rep's eyes brown? They ought to be, because he is full of it :) Never heard of that bug and can assure you it does not exist! But give us more details, maybe I am missing something...Also, give us the name of the vendor :) Robert Djabarov Senior SQL Server DBA USAA IT/DBMS ? (210) 913-3148 - phone ? (210) 753-3148 - pager -----Original Message----- From: Stoker, Kenneth E [mailto:Kenneth.Stoker at pnl.gov] Sent: Thursday, May 15, 2003 5:14 PM To: dba-SQLServer (E-mail) Subject: [dba-SQLServer]Security Permissions on Views We recently implemented a system trying to implement security at the view level. Upon deploying, it was discovered that security at the view level appeared to have no relevance. We ended up having to set permissions on the tables themselves. The vendor of the application stated that there was a bug in SQL Server that M$ had not fixed yet such that the permissions on view didn't work. Is this true? Ken Stoker Technology Commercialization Information Systems Administrator PH: (509) 375-3758 FAX: (509) 375-6731 E-mail: Kenneth.Stoker at pnl.gov _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From davide at dalyn.co.nz Fri May 16 16:14:21 2003 From: davide at dalyn.co.nz (David Emerson) Date: Sat, 17 May 2003 09:14:21 +1200 Subject: [dba-SQLServer]Security Permissions on Views In-Reply-To: <5A31F89EC4C79B49B5030FF2EF58E9D202DABFCE@ex02.eagle.usaa.c om> Message-ID: <5.2.0.9.0.20030517091222.00b396f8@mail.dalyn.co.nz> Perhaps he is referring to a problem with ADP's using views and the tables not having permissions. See pages 124 and 130 of "MS Access Developer's Guide to SQL Server" (Chipman and Baron). Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 At 16/05/2003, you wrote: >Are your vendor rep's eyes brown? They ought to be, because he is full of >it :) Never heard of that bug and can assure you it does not exist! But >give us more details, maybe I am missing something...Also, give us the >name of the vendor :) > >Robert Djabarov >Senior SQL Server DBA >USAA IT/DBMS >? (210) 913-3148 - phone >? (210) 753-3148 - pager > > > -----Original Message----- >From: Stoker, Kenneth E [mailto:Kenneth.Stoker at pnl.gov] >Sent: Thursday, May 15, 2003 5:14 PM >To: dba-SQLServer (E-mail) >Subject: [dba-SQLServer]Security Permissions on Views > >We recently implemented a system trying to implement security at the view >level. Upon deploying, it was discovered that security at the view level >appeared to have no relevance. We ended up having to set permissions on >the tables themselves. The vendor of the application stated that there >was a bug in SQL Server that M$ had not fixed yet such that the >permissions on view didn't work. Is this true? > >Ken Stoker >Technology Commercialization >Information Systems Administrator >PH: (509) 375-3758 >FAX: (509) 375-6731 >E-mail: Kenneth.Stoker at pnl.gov > > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com From andrew.haslett at ilc.gov.au Sun May 18 07:02:29 2003 From: andrew.haslett at ilc.gov.au (Haslett, Andrew) Date: Sun, 18 May 2003 21:32:29 +0930 Subject: [dba-SQLServer]ADODB connection via ASP to SS7 Message-ID: In the IIS Manager, if you right-click the directory housing your applcation to view its properties, under Directory Security, you will find the account that anonymous web requests are run under. You can change that user here, or configure other methods of authentication. Alternatively you can specify a username and password in your database connection string, which therefore assumes SQL Server authentication. Here are some examples of connection strings that you may use (watch wrap): http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDB ProviderForSQLServer Cheers, Andrew -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Thursday, 15 May 2003 11:58 PM To: 'dba-sqlserver at databaseadvisors.com' Subject: [dba-SQLServer]ADODB connection via ASP to SS7 Hi All, SS7 on Win2000 Server IIS4 on WinNT 4 Server I am trying to create an ASP page that makes a connection to a SS7 database using an ADODB Connection object. When I test the ASP page I get this error: Microsoft OLE DB Provider for SQL Server error '80040e4d' Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. How do I control what user the web server uses to connect to SS7? What I mean is that I did not anticipate ANONYMOUS LOGON to be used for the database access and would like to have the web server use a different NT login. Here is the code I am using in my ASP page: Dim OBJdbConnection Set OBJdbConnection = Server.CreateObject("ADODB.Connection") OBJdbConnection.ConnectionTimeout = 15 OBJdbConnection.CommandTimeout = 30 OBJdbConnection.Open "Provider=sqloledb;Data Source=SQLSERVER;Initial Catalog=TimeTracker;Integrated Security=SSPI" Thanks, Joe R. This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. From davide at dalyn.co.nz Sun May 18 20:53:19 2003 From: davide at dalyn.co.nz (David Emerson) Date: Mon, 19 May 2003 13:53:19 +1200 Subject: [dba-SQLServer]Security Report Message-ID: <5.2.0.9.0.20030519135114.0213dd08@mail.dalyn.co.nz> I am looking for a tool that will show the security permissions for a database. Ideally it would be set out similar to the permissions screen with the objects down the left hand side, and the permissions along the top. I would like a separate report for each role. Does anyone know of a tool like this? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 From michael.broesdorf at web.de Mon May 19 03:23:18 2003 From: michael.broesdorf at web.de (=?iso-8859-1?Q?Michael_Br=F6sdorf?=) Date: Mon, 19 May 2003 10:23:18 +0200 Subject: [dba-SQLServer]ODBC-Problem (Cross-posted) In-Reply-To: <001a01c31dd9$b01327e0$b501010a@DAISY.local> Message-ID: Hi all, I have a strange problem with my Access 2K app: The app uses linked ODBC tables to connect to a SQL-Server 2000. One of the tables actually links a view that combines data from 2 tables. A data entry form is based on that linked table. I can update data in all the fields with one exception: when I try to update data in fields that originate from both base tables I get this ODBC error: "[Microsoft][ODBC SQL Server Driver][SQL Server]View of function 'dbo.myview' is not updateable because the modification affects multiple base tables. (#4405#)" It does not make a difference if I try that in the data entry form or the linked table directly. Now, the strange thing is, if I open the view on the server using the enterprise manager, I _can_ update fields from different base tables simultaneously. Is there any way to 'convince' my app, that this kind of updates _is_ possible? Michael From JRojas at tnco-inc.com Mon May 19 09:36:16 2003 From: JRojas at tnco-inc.com (Joe Rojas) Date: Mon, 19 May 2003 10:36:16 -0400 Subject: [dba-SQLServer]Random password generator? Message-ID: <806536912C472E4A9D6515DF2E57261E0C5A6B@mercury.tnco-inc.com> Hi All, Does anyone have any routines that I could put in a stored procedure in SS7 that will generate random alpha-numeric passwords? I would like to be able to also specify what length of a password that I want. If you don't have one, maybe someone has a idea of how to do this? Thank in advance! Joe R. This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From knicholson at gpsx.net Mon May 19 16:46:44 2003 From: knicholson at gpsx.net (Nicholson, Karen) Date: Mon, 19 May 2003 16:46:44 -0500 Subject: [dba-SQLServer]Data Dictionary/File Layouts Message-ID: Hi to all those familiar with my antics from AccessD. Question - I want to just print out the data dictionary/file layouts for this monster of a database that I have an can't seem to find a way to accomplish this minor task. Anyone know the answer? OF COURSE you do!! Thanks, Karen Nicholson From andy at minstersystems.co.uk Mon May 19 17:16:21 2003 From: andy at minstersystems.co.uk (Andy Lacey) Date: Mon, 19 May 2003 23:16:21 +0100 Subject: [dba-SQLServer]Data Dictionary/File Layouts In-Reply-To: Message-ID: <013201c31e54$470e1fe0$b274d0d5@andypc> Karen I wrote something to do this and it's on my website, but it was written for a BE of Access tables. From the fact that you've posted here I take it your BE is SQL Server. Don't suppose it'd work but if you want to try it's at http://www.minstersystems.co.uk/download.htm Andy Lacey http://www.minstersystems.co.uk > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf > Of Nicholson, Karen > Sent: 19 May 2003 22:47 > To: SQL Server List (E-mail) > Subject: [dba-SQLServer]Data Dictionary/File Layouts > > > Hi to all those familiar with my antics from AccessD. > Question - I want to just print out the data dictionary/file > layouts for this monster of a database that I have an can't > seem to find a way to accomplish this minor task. Anyone > know the answer? OF COURSE you do!! > > Thanks, > Karen Nicholson > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From stuart at lexacorp.com.pg Mon May 19 19:42:09 2003 From: stuart at lexacorp.com.pg (stuart at lexacorp.com.pg) Date: Tue, 20 May 2003 10:42:09 +1000 Subject: [dba-SQLServer]Random password generator? In-Reply-To: <806536912C472E4A9D6515DF2E57261E0C5A6B@mercury.tnco-inc.com> Message-ID: <3ECA0681.2350.316E4@localhost> On 19 May 2003 at 10:36, Joe Rojas wrote: > Hi All, > > Does anyone have any routines that I could put in a stored procedure in SS7 > that will generate random alpha-numeric passwords? > I would like to be able to also specify what length of a password that I > want. > > If you don't have one, maybe someone has a idea of how to do this? > > Thank in advance! > CREATE PROCEDURE CREATE_PASSWORD @maxlength int AS declare @password nvarchar(20) declare @counter int declare @charint int declare @chars nvarchar(62) set @counter = 0 set @chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' SET @PASSWORD = '' WHILE @counter < @maxlength BEGIN SET @counter = @counter + 1 set @charint = rand()*62 +1 set @password = @password + SUBSTRING(@chars, at charint,1) END select @password -- Lexacorp Ltd Information Technology Consultancy, Application Development From davide at dalyn.co.nz Tue May 20 20:40:11 2003 From: davide at dalyn.co.nz (David Emerson) Date: Wed, 21 May 2003 13:40:11 +1200 Subject: [dba-SQLServer]Changing apostrophes in string In-Reply-To: References: <5.2.0.9.0.20030218065624.00b1cfa0@mail.dalyn.co.nz> Message-ID: <5.2.0.9.0.20030521133445.00b1e458@mail.dalyn.co.nz> I know it has been a long time but I finally managed to get around to fixing this part of my program. I have a couple of refinements that I have shown below. One is that if the apostrophe is at the end of the text then it would not have been picked up (needed to change the comparison to <=). Second was that if there was more than 1 apostrophe then because the ChkText was getting longer with the extra apostrophes it might not have checked to the end so I deleted the lbLength variable and checked against the new length each loop. Here is my amended code. Public Function basFixSingleQuote(strChkText As String) As String Dim intPosition As Integer intPosition = InStr(1, strChkText, "'") Do While intPosition > 0 And intPosition <= Len(strChkText) strChkText = Left(strChkText, intPosition) & Mid(strChkText, intPosition) intPosition = InStr(intPosition + 2, strChkText, "'") Loop basFixSingleQuote = strChkText End Function Regards David Emerson At 17/02/2003, you wrote: >Hi David: > >Here is an example that works with all versions of Access: > > .... > With EmployeeRecord > .Surname = FixSingleQuote(.Surname) > End With > .... > >Public Function FixSingleQuote(ChkText As String) as String > Dim lbPosition As Integer > Dim lbLength As Integer > > lbLength = Len(ChkText) > lbPosition = InStr(1, ChkText, "'") > > Do While lbPosition > 0 And lbPosition < lbLength > ChkText = Left(ChkText, lbPosition) & Mid(ChkText, lbPosition) > lbPosition = InStr(lbPosition + 2, ChkText, "'") > Loop > > FixSingleQuote = ChkText > >End Function > >HTH >Jim > >-----Original Message----- >From: dba-sqlserver-admin at databaseadvisors.com >[mailto:dba-sqlserver-admin at databaseadvisors.com]On Behalf Of David >Emerson >Sent: Monday, February 17, 2003 9:58 AM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer]Changing apostrophes in string > > >Thanks. Does anyone have the code handy to do this (I could sit down and >write a function that does it but am running out of time). > >David > >At 17/02/2003, you wrote: > >Hi David, > > > >replcace every ' with '' (2 apostrophes, the first ' acts as an escape > >character) before sending > >the sql statement to SQL2000. > >This especially gives you some (though not enough) protection in case of > >sql injections ([Forms]![frmCustomers]!MName = > >"test ' drop table tblCustStatement -- " etc.) > > > > > >Christoph Seck > > > > > > > >-------- Original Message -------- > >Subject: [dba-SQLServer]Changing apostrophes in string (17-Feb-2003 4:21) > >From: davide at dalyn.co.nz > >To: dbaSQL.chseck at kuehne-holz.de > > > > > I tried the archives but couldn't get in . > > > > > > I have a simple sql statement to be run from and AXP ADP to SQL2000 > > > > > > DoCmd.RunSQL "UPDATE tblCustStatement SET tblCustStatement.SMName = '" & > > > [Forms]![frmCustomers]![MName] & "' WHERE (((tblCustStatement.CustIDNo)= > > > " & [Forms]![frmCustomers]![txtCustomerID] & ") AND > > > ((tblCustStatement.StatementNumber)= " & > > > [Forms]![frmCustomers]![txtInvNumber] & "));" > > > > > > How do we handle the following situation where > > [Forms]![frmCustomers]!MName > > > > > > includes an apostrophe? > > > > > > > > > Regards > > > > > > David Emerson > > > DALYN Software Ltd > > > 25b Cunliffe St, Johnsonville > > > Wellington, New Zealand > > > Ph/Fax (877) 456-1205 > > > > > > _______________________________________________ > > > dba-SQLServer mailing list > > > dba-SQLServer at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > > > http://www.databaseadvisors.com > > > > > > >_______________________________________________ > >dba-SQLServer mailing list > >dba-SQLServer at databaseadvisors.com > >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >http://www.databaseadvisors.com > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com From subs at solution-providers.ie Wed May 21 05:45:36 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Wed, 21 May 2003 11:45:36 +0100 Subject: [dba-SQLServer]SQL Server and Visual InterDev References: <61F915314798D311A2F800A0C9C83188039569EC@dibble.observatory.donnslaw.co.uk> Message-ID: <001e01c31f86$48f7bd60$6a1118ac@D8TZHN0J> MessageHello All, I have started using VID recently to do all my database work. I am finding it great. Building sprocs in it are much easier than in Enterprise manager. For some reason, in the last few days, when I edit SQL within an Sproc or a view within VID, it does not display my columns, even though they are turned on! I am presuming that I clicked something, but I have no idea what it is, I cannot find anything in the BOl to help me, it must be something simple. Has anyone any ideas? Are any of you guys using VID to edit database work? Do you like it, have you found anything better ? Thanks in advance for any help, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From artful at rogers.com Wed May 21 06:24:12 2003 From: artful at rogers.com (Arthur Fuller) Date: Wed, 21 May 2003 07:24:12 -0400 Subject: [dba-SQLServer]SQL Server and Visual InterDev In-Reply-To: <001e01c31f86$48f7bd60$6a1118ac@D8TZHN0J> Message-ID: <015d01c31f8b$8166f7b0$8e01a8c0@Rock> What's VID? A. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark L. Breen Sent: May 21, 2003 6:46 AM To: AccessD at databaseadvisors.com; dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-SQLServer]SQL Server and Visual InterDev Hello All, I have started using VID recently to do all my database work. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.haslett at ilc.gov.au Wed May 21 06:59:24 2003 From: andrew.haslett at ilc.gov.au (Haslett, Andrew) Date: Wed, 21 May 2003 21:29:24 +0930 Subject: [dba-SQLServer]SQL Server and Visual InterDev Message-ID: Visual Interdev - part of the MS Visual Studio Suite. Must say after using VI for 3 years I never realised you could do that! I use it all the time in VS.Net but had no idea. -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Wednesday, 21 May 2003 8:54 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]SQL Server and Visual InterDev What's VID? A. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark L. Breen Sent: May 21, 2003 6:46 AM To: AccessD at databaseadvisors.com; dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-SQLServer]SQL Server and Visual InterDev Hello All, I have started using VID recently to do all my database work. IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. -------------- next part -------------- An HTML attachment was scrubbed... URL: From MarkBoyd at McBeeAssociates.com Wed May 21 07:39:48 2003 From: MarkBoyd at McBeeAssociates.com (Mark Boyd) Date: Wed, 21 May 2003 08:39:48 -0400 Subject: [dba-SQLServer]Trim function Message-ID: Is there a way to trim a field in one step? I use the 'ltrim' function, but then need to use 'rtrim'. I would like to trim fields in one step, not two. Thanks, Mark Boyd Sr. Systems Analyst McBee Associates, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikedorism at ntelos.net Wed May 21 09:05:02 2003 From: mikedorism at ntelos.net (Mike and Doris Manning) Date: Wed, 21 May 2003 10:05:02 -0400 Subject: [dba-SQLServer]Trim function In-Reply-To: Message-ID: <000001c31fa1$fc9e62e0$3c320cd8@hargrove.internal> RTrim(LTrim(" xxx ")) Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark Boyd Sent: Wednesday, May 21, 2003 8:40 AM To: SQLServerList Subject: [dba-SQLServer]Trim function Is there a way to trim a field in one step? I use the 'ltrim' function, but then need to use 'rtrim'. I would like to trim fields in one step, not two. Thanks, Mark Boyd Sr. Systems Analyst McBee Associates, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From MarkBoyd at McBeeAssociates.com Wed May 21 09:04:59 2003 From: MarkBoyd at McBeeAssociates.com (Mark Boyd) Date: Wed, 21 May 2003 10:04:59 -0400 Subject: [dba-SQLServer]Trim function Message-ID: Thanks Doris, I'll give it a try. Mark -----Original Message----- From: Mike and Doris Manning [mailto:mikedorism at ntelos.net] Sent: Wednesday, May 21, 2003 10:05 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Trim function RTrim(LTrim(" xxx ")) Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark Boyd Sent: Wednesday, May 21, 2003 8:40 AM To: SQLServerList Subject: [dba-SQLServer]Trim function Is there a way to trim a field in one step? I use the 'ltrim' function, but then need to use 'rtrim'. I would like to trim fields in one step, not two. Thanks, Mark Boyd Sr. Systems Analyst McBee Associates, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From DElam at jenkens.com Wed May 21 09:16:32 2003 From: DElam at jenkens.com (Elam, Debbie) Date: Wed, 21 May 2003 09:16:32 -0500 Subject: [dba-SQLServer]Trim function Message-ID: <4AAC675EBAF3D411BCA200508BCFAA8E02F218F6@NATEXCH1> I have never found a plain trim function for SQL. rtrim(ltrim(field)) seems to work to put into one step though. Debbie -----Original Message----- From: Mark Boyd [mailto:MarkBoyd at mcbeeassociates.com] Sent: Wednesday, May 21, 2003 7:40 AM To: SQLServerList Subject: [dba-SQLServer]Trim function Is there a way to trim a field in one step? I use the 'ltrim' function, but then need to use 'rtrim'. I would like to trim fields in one step, not two. Thanks, Mark Boyd Sr. Systems Analyst McBee Associates, Inc. - JENKENS & GILCHRIST E-MAIL NOTICE - This transmission may be: (1) subject to the Attorney-Client Privilege, (2) an attorney work product, or (3) strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. This communication does not reflect an intention by the sender or the sender's client or principal to conduct a transaction or make any agreement by electronic means. Nothing contained in this message or in any attachment shall satisfy the requirements for a writing, and nothing contained herein shall constitute a contract or electronic signature under the Electronic Signatures in Global and National Commerce Act, any version of the Uniform Electronic Transactions Act or any other statute governing electronic transactions. From my.lists at verizon.net Wed May 21 10:45:19 2003 From: my.lists at verizon.net (Francisco Tapia) Date: Wed, 21 May 2003 08:45:19 -0700 Subject: [dba-SQLServer]Trim function References: <4AAC675EBAF3D411BCA200508BCFAA8E02F218F6@NATEXCH1> Message-ID: <005a01c31faf$fb8e7120$fd512304@amd2k> there isn't just a simple onestep trim function, but I suppose if you really wanted one, you could just build a UDF for it, (sql2000 and up). -Francisco http://rcm.netfirms.com/ On Wednesday, May 21, 2003 7:16 AM [GMT -8], Elam, Debbie wrote: : I have never found a plain trim function for SQL. : rtrim(ltrim(field)) seems to work to put into one step though. : : Debbie : : -----Original Message----- : From: Mark Boyd [mailto:MarkBoyd at mcbeeassociates.com] : Sent: Wednesday, May 21, 2003 7:40 AM : To: SQLServerList : Subject: [dba-SQLServer]Trim function : : : : Is there a way to trim a field in one step? : : I use the 'ltrim' function, but then need to use 'rtrim'. I would : like to trim fields in one step, not two. : : : : Thanks, : : Mark Boyd : : Sr. Systems Analyst : : McBee Associates, Inc. : : : : : : - JENKENS & GILCHRIST E-MAIL NOTICE - This transmission may be: (1) : subject to the Attorney-Client Privilege, (2) an attorney work : product, or (3) strictly confidential. If you are not the intended : recipient of this message, you may not disclose, print, copy or : disseminate this information. If you have received this in error, : please reply and notify the sender (only) and delete the message. : Unauthorized interception of this e-mail is a violation of federal : criminal law. : : This communication does not reflect an intention by the sender or : the sender's client or principal to conduct a transaction or make any : agreement by electronic means. Nothing contained in this message or : in any attachment shall satisfy the requirements for a writing, and : nothing contained herein shall constitute a contract or electronic : signature under the Electronic Signatures in Global and National : Commerce Act, any version of the Uniform Electronic Transactions Act : or any other statute governing electronic transactions. : : : _______________________________________________ : dba-SQLServer mailing list : dba-SQLServer at databaseadvisors.com : http://databaseadvisors.com/mailman/listinfo/dba-sqlserver : http://www.databaseadvisors.com From subs at solution-providers.ie Wed May 21 10:33:28 2003 From: subs at solution-providers.ie (Mark L. Breen) Date: Wed, 21 May 2003 16:33:28 +0100 Subject: [dba-SQLServer]SQL Server and Visual InterDev References: <015d01c31f8b$8166f7b0$8e01a8c0@Rock> Message-ID: <006601c31fb9$e499c780$6a1118ac@D8TZHN0J> MessageHello Arthur, It is great, have a go with it, create your tables, edit your data, create sp's, edit and generate SQL, format and document your sp all within VI Use things like go ol' copy and paste, Mark ----- Original Message ----- From: Arthur Fuller To: dba-sqlserver at databaseadvisors.com Sent: Wednesday, May 21, 2003 12:24 PM Subject: RE: [dba-SQLServer]SQL Server and Visual InterDev What's VID? A. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark L. Breen Sent: May 21, 2003 6:46 AM To: AccessD at databaseadvisors.com; dba-sqlserver at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [dba-SQLServer]SQL Server and Visual InterDev Hello All, I have started using VID recently to do all my database work. ------------------------------------------------------------------------------ _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From JRojas at tnco-inc.com Thu May 22 09:46:46 2003 From: JRojas at tnco-inc.com (Joe Rojas) Date: Thu, 22 May 2003 10:46:46 -0400 Subject: [dba-SQLServer]xp_sendmail - format output of @query Message-ID: <806536912C472E4A9D6515DF2E57261E0C5A78@mercury.tnco-inc.com> Hi All, When using xp_sendmail from a stored procedure in SS7, is it possible to format the output of the query specified in the @query parameter? Below is what I got in an email by using xp_sendmail. As you can see it is pretty much useless to the untrained eye. UserName First Last email Password FirstLogin ----------------------------- ------------------------------ ------------------------------ ---------------------------------------- -------------------- ---------- jrojas Joe Rojas jrojas at tnco-inc.com 041797 0 Thanks, Joe R. This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From knicholson at gpsx.net Fri May 23 14:13:15 2003 From: knicholson at gpsx.net (Nicholson, Karen) Date: Fri, 23 May 2003 14:13:15 -0500 Subject: [dba-SQLServer]Update Trigger Message-ID: I need to create an update trigger on a table to update a field in another table. This is the scope: Originating table: System /**I did not name it, proprietary package**/ Field: CS_No Key Field: Site_no Destination Table: Recur_Line Field: UDF1CS_no Key Field: Service_Site_No Scenario: When the user is in the system, he enters in a CS_No in the table(System) field(CS_No). I need this to populate the UDF1CS_no field in the Recur_Line table when the System.Site_no=Recur_Line.SiteNo This is my first "cross pollinating" trigger as I refer to it. Does anyone have an example? Thanks, gurus. Karen Nicholson SQL Database Administrator Guardian Protection Services From Robert.Djabarov at usaa.com Fri May 23 13:27:20 2003 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Fri, 23 May 2003 13:27:20 -0500 Subject: [dba-SQLServer]Update Trigger Message-ID: <5A31F89EC4C79B49B5030FF2EF58E9D202DAC003@ex02.eagle.usaa.com> Something like that may work, but you need to check. if object_id('trigI_System') is not null drop trigger trigI_System go create trigger trigI_System on [System] for insert as if update(CS_No) begin insert Recur_Line (Service_Site_No, UDF1) select Site_no, CS_No from inserted if @@error != 0 begin raiserror('Failed to insert into Recur_Line!', 15, 1) rollback transaction end end GO Robert Djabarov Senior SQL Server DBA USAA IT/DBMS ? (210) 913-3148 - phone ? (210) 753-3148 - pager -----Original Message----- From: Nicholson, Karen [mailto:knicholson at gpsx.net] Sent: Friday, May 23, 2003 2:13 PM To: SQL Server List (E-mail) Subject: [dba-SQLServer]Update Trigger I need to create an update trigger on a table to update a field in another table. This is the scope: Originating table: System /**I did not name it, proprietary package**/ Field: CS_No Key Field: Site_no Destination Table: Recur_Line Field: UDF1CS_no Key Field: Service_Site_No Scenario: When the user is in the system, he enters in a CS_No in the table(System) field(CS_No). I need this to populate the UDF1CS_no field in the Recur_Line table when the System.Site_no=Recur_Line.SiteNo This is my first "cross pollinating" trigger as I refer to it. Does anyone have an example? Thanks, gurus. Karen Nicholson SQL Database Administrator Guardian Protection Services _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From knicholson at gpsx.net Fri May 23 15:10:09 2003 From: knicholson at gpsx.net (Nicholson, Karen) Date: Fri, 23 May 2003 15:10:09 -0500 Subject: [dba-SQLServer]Update Trigger Message-ID: OK. This got me farther, but now I am suffering from MS-VBA withdrawal. I am used to being able to put event procedures on a form to just select the current record. This is a proprietary package, so I can not make changes to the form. How do you select the current record? Is that possible? I don't want to update all records in the table as this is a default update, the user may change the value in certain situations. Thanks. -----Original Message----- From: Djabarov, Robert [mailto:Robert.Djabarov at usaa.com] Sent: Friday, May 23, 2003 1:27 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Update Trigger Something like that may work, but you need to check. if object_id('trigI_System') is not null drop trigger trigI_System go create trigger trigI_System on [System] for insert as if update(CS_No) begin insert Recur_Line (Service_Site_No, UDF1) select Site_no, CS_No from inserted if @@error != 0 begin raiserror('Failed to insert into Recur_Line!', 15, 1) rollback transaction end end GO Robert Djabarov Senior SQL Server DBA USAA IT/DBMS ? (210) 913-3148 - phone ? (210) 753-3148 - pager -----Original Message----- From: Nicholson, Karen [mailto:knicholson at gpsx.net] Sent: Friday, May 23, 2003 2:13 PM To: SQL Server List (E-mail) Subject: [dba-SQLServer]Update Trigger I need to create an update trigger on a table to update a field in another table. This is the scope: Originating table: System /**I did not name it, proprietary package**/ Field: CS_No Key Field: Site_no Destination Table: Recur_Line Field: UDF1CS_no Key Field: Service_Site_No Scenario: When the user is in the system, he enters in a CS_No in the table(System) field(CS_No). I need this to populate the UDF1CS_no field in the Recur_Line table when the System.Site_no=Recur_Line.SiteNo This is my first "cross pollinating" trigger as I refer to it. Does anyone have an example? Thanks, gurus. Karen Nicholson SQL Database Administrator Guardian Protection Services _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From knicholson at gpsx.net Fri May 23 16:07:26 2003 From: knicholson at gpsx.net (Nicholson, Karen) Date: Fri, 23 May 2003 16:07:26 -0500 Subject: [dba-SQLServer]Update Trigger Message-ID: Never mind - I was able to figure out the current record thing. As simple as defining the keys in the table where they equal the insert.key fields. YEEE HAAA -----Original Message----- From: Djabarov, Robert [mailto:Robert.Djabarov at usaa.com] Sent: Friday, May 23, 2003 1:27 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Update Trigger Something like that may work, but you need to check. if object_id('trigI_System') is not null drop trigger trigI_System go create trigger trigI_System on [System] for insert as if update(CS_No) begin insert Recur_Line (Service_Site_No, UDF1) select Site_no, CS_No from inserted if @@error != 0 begin raiserror('Failed to insert into Recur_Line!', 15, 1) rollback transaction end end GO Robert Djabarov Senior SQL Server DBA USAA IT/DBMS ? (210) 913-3148 - phone ? (210) 753-3148 - pager -----Original Message----- From: Nicholson, Karen [mailto:knicholson at gpsx.net] Sent: Friday, May 23, 2003 2:13 PM To: SQL Server List (E-mail) Subject: [dba-SQLServer]Update Trigger I need to create an update trigger on a table to update a field in another table. This is the scope: Originating table: System /**I did not name it, proprietary package**/ Field: CS_No Key Field: Site_no Destination Table: Recur_Line Field: UDF1CS_no Key Field: Service_Site_No Scenario: When the user is in the system, he enters in a CS_No in the table(System) field(CS_No). I need this to populate the UDF1CS_no field in the Recur_Line table when the System.Site_no=Recur_Line.SiteNo This is my first "cross pollinating" trigger as I refer to it. Does anyone have an example? Thanks, gurus. Karen Nicholson SQL Database Administrator Guardian Protection Services _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From AdamCogan at ssw.com.au Tue May 27 06:24:38 2003 From: AdamCogan at ssw.com.au (Adam Cogan www.ssw.com.au) Date: Tue, 27 May 2003 21:24:38 +1000 Subject: [dba-SQLServer]Data Dictionary/File Layouts Message-ID: Yes there is a utility at http://www.ag-software.com that does a great job. Also has options to package it up in a .chm (Help) file and can create a searchable .asp site Adam Cogan SSW Chief Architect, Microsoft (MSDN) Regional Director AdamCogan at ssw.com.au Phone: +612 9953 3000 Mobile: 04 1985 1995 Superior Software for Windows Building better Microsoft solutions in ASP.NET, VB.NET, SQL Server, Exchange and MS Access Check out our HOT utilities for .NET Developers www.ssw.com.au Deploy new versions of your SQL Server backend simply with SSW SQL Deploy www.ssw.com.au/ssw/SQLDeploy -----Original Message----- From: Andy Lacey [mailto:andy at minstersystems.co.uk] Sent: Tuesday, 20 May 2003 8:16 AM To: dba-sqlserver at databaseadvisors.com Karen I wrote something to do this and it's on my website, but it was written for a BE of Access tables. From the fact that you've posted here I take it your BE is SQL Server. Don't suppose it'd work but if you want to try it's at http://www.minstersystems.co.uk/download.htm Andy Lacey http://www.minstersystems.co.uk > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf > Of Nicholson, Karen > Sent: 19 May 2003 22:47 > To: SQL Server List (E-mail) > Subject: [dba-SQLServer]Data Dictionary/File Layouts > > > Hi to all those familiar with my antics from AccessD. > Question - I want to just print out the data dictionary/file > layouts for this monster of a database that I have an can't > seem to find a way to accomplish this minor task. Anyone > know the answer? OF COURSE you do!! > > Thanks, > Karen Nicholson > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From knicholson at gpsx.net Tue May 27 14:06:22 2003 From: knicholson at gpsx.net (Nicholson, Karen) Date: Tue, 27 May 2003 14:06:22 -0500 Subject: [dba-SQLServer]Disk Space Tracking - OT Message-ID: OT subject - I am looking for a product to track the drive capacity, reserved, allocated and unallocated space on my servers - up to 30 different drives. It would be nice if it held historical data, or just provided the means to export to a comma delimited file for importing into a product for graphing. I found the Free Disk Space 2.01C program, but it does not offer the reserved, allocated or unallocated information, just volumes and free space. Anybody have a recommendation? Karen Nicholson SQL Database Administrator Guardian Protection Services knicholson at gspx.net From davide at dalyn.co.nz Wed May 28 21:16:46 2003 From: davide at dalyn.co.nz (David Emerson) Date: Thu, 29 May 2003 14:16:46 +1200 Subject: [dba-SQLServer]Apostrophes in exported spreadsheets Message-ID: <5.2.0.9.0.20030529140553.00b31148@mail.dalyn.co.nz> When I use the following line in an ADP linked to SQL2K, any varchar fields have an apostrophe put at the front of the data - strTableName = "dbo.ttmpLoadAllocateExp" DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, strTableName, "C:\Sheet.xls Does any one know why, and how can it be avoided? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 From davide at dalyn.co.nz Wed May 28 21:43:28 2003 From: davide at dalyn.co.nz (David Emerson) Date: Thu, 29 May 2003 14:43:28 +1200 Subject: [dba-SQLServer]Exported spreadsheets not in order Message-ID: <5.2.0.9.0.20030529143712.021c39f0@mail.dalyn.co.nz> I have another problem with exporting to spreadsheets. I have three spreadsheets that are created for three companies within a database. The data is first put into a temporary table by a sproc which sorts the records in the right order by a varchar field. In two cases when the table is then exported to excel they records are still in the same order. In one case though the first chunk of records appear at the end of the spreadsheet. They are still in the correct order but it is as if they were deleted from the top and pasted to the bottom. It only happens for 1 of the three companies, it consistently happens, and to make matters worse, it works fine on my machine, but has the problem on another. Has anyone experienced this before or is it just a plan by psychiatrists to drum up more business? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 From CWortz at tea.state.tx.us Thu May 29 07:27:10 2003 From: CWortz at tea.state.tx.us (Wortz, Charles) Date: Thu, 29 May 2003 07:27:10 -0500 Subject: [dba-SQLServer]Apostrophes in exported spreadsheets Message-ID: David, That apostrophe tells Excel that what follows in the cell is to be treated as text, not numbers. If you want the cell values to be treated as numbers, then you need to change the exporting field datatypes from varchar to numeric datatypes. Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: David Emerson [mailto:davide at dalyn.co.nz] Sent: Wednesday 2003 May 28 21:17 To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer]Apostrophes in exported spreadsheets When I use the following line in an ADP linked to SQL2K, any varchar fields have an apostrophe put at the front of the data - strTableName = "dbo.ttmpLoadAllocateExp" DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, strTableName, "C:\Sheet.xls Does any one know why, and how can it be avoided? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 From Robert.Djabarov at usaa.com Thu May 29 13:27:08 2003 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 29 May 2003 13:27:08 -0500 Subject: [dba-SQLServer]Exported spreadsheets not in order Message-ID: <5A31F89EC4C79B49B5030FF2EF58E9D202DAC019@ex02.eagle.usaa.com> Check into differences of MDAC level and DSN settings between machines. Bottom line, - those are the contributing factors. Robert Djabarov Senior SQL Server DBA USAA IT/DBMS ? (210) 913-3148 - phone ? (210) 753-3148 - pager -----Original Message----- From: David Emerson [mailto:davide at dalyn.co.nz] Sent: Wednesday, May 28, 2003 9:43 PM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer]Exported spreadsheets not in order I have another problem with exporting to spreadsheets. I have three spreadsheets that are created for three companies within a database. The data is first put into a temporary table by a sproc which sorts the records in the right order by a varchar field. In two cases when the table is then exported to excel they records are still in the same order. In one case though the first chunk of records appear at the end of the spreadsheet. They are still in the correct order but it is as if they were deleted from the top and pasted to the bottom. It only happens for 1 of the three companies, it consistently happens, and to make matters worse, it works fine on my machine, but has the problem on another. Has anyone experienced this before or is it just a plan by psychiatrists to drum up more business? Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From davide at dalyn.co.nz Thu May 29 14:24:39 2003 From: davide at dalyn.co.nz (David Emerson) Date: Fri, 30 May 2003 07:24:39 +1200 Subject: [dba-SQLServer]Apostrophes in exported spreadsheets In-Reply-To: Message-ID: <5.2.0.9.0.20030530072107.02109d10@mail.dalyn.co.nz> The thing is that it didn't happen when I had A97 linked to an A97 BE. Text cells just had the text in them without the apostrophes. Another unusual thing is that some text fields have apostrophes at the beginning and end of the text, other text fields only have an apostrophe at the beginning! David At 29/05/2003, you wrote: >David, > >That apostrophe tells Excel that what follows in the cell is to be >treated as text, not numbers. If you want the cell values to be treated >as numbers, then you need to change the exporting field datatypes from >varchar to numeric datatypes. > >Charles Wortz >Software Development Division >Texas Education Agency >1701 N. Congress Ave >Austin, TX 78701-1494 >512-463-9493 >CWortz at tea.state.tx.us > > > >-----Original Message----- >From: David Emerson [mailto:davide at dalyn.co.nz] >Sent: Wednesday 2003 May 28 21:17 >To: dba-SQLServer at databaseadvisors.com >Subject: [dba-SQLServer]Apostrophes in exported spreadsheets > >When I use the following line in an ADP linked to SQL2K, any varchar >fields >have an apostrophe put at the front of the data - > >strTableName = "dbo.ttmpLoadAllocateExp" > >DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, >strTableName, >"C:\Sheet.xls > >Does any one know why, and how can it be avoided? > > >Regards > >David Emerson >DALYN Software Ltd >25b Cunliffe St, Johnsonville >Wellington, New Zealand >Ph/Fax (877) 456-1205 >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com From davide at dalyn.co.nz Thu May 29 14:33:05 2003 From: davide at dalyn.co.nz (David Emerson) Date: Fri, 30 May 2003 07:33:05 +1200 Subject: [dba-SQLServer]Exported spreadsheets not in order In-Reply-To: <5A31F89EC4C79B49B5030FF2EF58E9D202DAC019@ex02.eagle.usaa.c om> Message-ID: <5.2.0.9.0.20030530073203.00b34dd0@mail.dalyn.co.nz> Thanks. Where do I find these settings? At 29/05/2003, you wrote: >Check into differences of MDAC level and DSN settings between >machines. Bottom line, - those are the contributing factors. > >Robert Djabarov >Senior SQL Server DBA >USAA IT/DBMS >? (210) 913-3148 - phone >? (210) 753-3148 - pager > > > -----Original Message----- >From: David Emerson [mailto:davide at dalyn.co.nz] >Sent: Wednesday, May 28, 2003 9:43 PM >To: dba-SQLServer at databaseadvisors.com >Subject: [dba-SQLServer]Exported spreadsheets not in order > >I have another problem with exporting to spreadsheets. I have three >spreadsheets that are created for three companies within a database. The >data is first put into a temporary table by a sproc which sorts the records >in the right order by a varchar field. In two cases when the table is then >exported to excel they records are still in the same order. In one case >though the first chunk of records appear at the end of the >spreadsheet. They are still in the correct order but it is as if they were >deleted from the top and pasted to the bottom. > >It only happens for 1 of the three companies, it consistently happens, and >to make matters worse, it works fine on my machine, but has the problem on >another. > >Has anyone experienced this before or is it just a plan by psychiatrists to >drum up more business? > > >Regards > >David Emerson >DALYN Software Ltd >25b Cunliffe St, Johnsonville >Wellington, New Zealand >Ph/Fax (877) 456-1205 From CWortz at tea.state.tx.us Thu May 29 14:46:11 2003 From: CWortz at tea.state.tx.us (Wortz, Charles) Date: Thu, 29 May 2003 14:46:11 -0500 Subject: [dba-SQLServer]Apostrophes in exported spreadsheets Message-ID: David, The apostrophe is an Excel, not an Access, specification for a text field. Thus Access doesn't need it, but Excel does, so Access puts it in when you export text strings to Excel. A string delimited by quotes also indicates a text field to Excel. Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: David Emerson [mailto:davide at dalyn.co.nz] Sent: Thursday 2003 May 29 14:25 To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Apostrophes in exported spreadsheets The thing is that it didn't happen when I had A97 linked to an A97 BE. Text cells just had the text in them without the apostrophes. Another unusual thing is that some text fields have apostrophes at the beginning and end of the text, other text fields only have an apostrophe at the beginning! David At 29/05/2003, you wrote: >David, > >That apostrophe tells Excel that what follows in the cell is to be >treated as text, not numbers. If you want the cell values to be >treated as numbers, then you need to change the exporting field >datatypes from varchar to numeric datatypes. > >Charles Wortz >-----Original Message----- >From: David Emerson [mailto:davide at dalyn.co.nz] >Sent: Wednesday 2003 May 28 21:17 >To: dba-SQLServer at databaseadvisors.com >Subject: [dba-SQLServer]Apostrophes in exported spreadsheets > >When I use the following line in an ADP linked to SQL2K, any varchar >fields have an apostrophe put at the front of the data - > >strTableName = "dbo.ttmpLoadAllocateExp" > >DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, >strTableName, "C:\Sheet.xls > >Does any one know why, and how can it be avoided? > > >Regards > >David Emerson >DALYN Software Ltd >25b Cunliffe St, Johnsonville >Wellington, New Zealand >Ph/Fax (877) 456-1205 From Robert.Djabarov at usaa.com Thu May 29 14:50:29 2003 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 29 May 2003 14:50:29 -0500 Subject: [dba-SQLServer]Exported spreadsheets not in order Message-ID: <5A31F89EC4C79B49B5030FF2EF58E9D202DAC020@ex02.eagle.usaa.com> Control Panel/Data Sources or Control Panel/Administrative Tools/Data Sources Robert Djabarov Senior SQL Server DBA USAA IT/DBMS ? (210) 913-3148 - phone ? (210) 753-3148 - pager -----Original Message----- From: David Emerson [mailto:davide at dalyn.co.nz] Sent: Thursday, May 29, 2003 2:33 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Exported spreadsheets not in order Thanks. Where do I find these settings? At 29/05/2003, you wrote: >Check into differences of MDAC level and DSN settings between >machines. Bottom line, - those are the contributing factors. > >Robert Djabarov >Senior SQL Server DBA >USAA IT/DBMS >? (210) 913-3148 - phone >? (210) 753-3148 - pager > > > -----Original Message----- >From: David Emerson [mailto:davide at dalyn.co.nz] >Sent: Wednesday, May 28, 2003 9:43 PM >To: dba-SQLServer at databaseadvisors.com >Subject: [dba-SQLServer]Exported spreadsheets not in order > >I have another problem with exporting to spreadsheets. I have three >spreadsheets that are created for three companies within a database. The >data is first put into a temporary table by a sproc which sorts the records >in the right order by a varchar field. In two cases when the table is then >exported to excel they records are still in the same order. In one case >though the first chunk of records appear at the end of the >spreadsheet. They are still in the correct order but it is as if they were >deleted from the top and pasted to the bottom. > >It only happens for 1 of the three companies, it consistently happens, and >to make matters worse, it works fine on my machine, but has the problem on >another. > >Has anyone experienced this before or is it just a plan by psychiatrists to >drum up more business? > > >Regards > >David Emerson >DALYN Software Ltd >25b Cunliffe St, Johnsonville >Wellington, New Zealand >Ph/Fax (877) 456-1205 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From davide at dalyn.co.nz Thu May 29 16:10:17 2003 From: davide at dalyn.co.nz (David Emerson) Date: Fri, 30 May 2003 09:10:17 +1200 Subject: [dba-SQLServer]Apostrophes in exported spreadsheets In-Reply-To: Message-ID: <5.2.0.9.0.20030530090954.00bca538@mail.dalyn.co.nz> Thanks. At 29/05/2003, you wrote: >David, > >The apostrophe is an Excel, not an Access, specification for a text >field. Thus Access doesn't need it, but Excel does, so Access puts it >in when you export text strings to Excel. A string delimited by quotes >also indicates a text field to Excel. > >Charles Wortz >Software Development Division >Texas Education Agency >1701 N. Congress Ave >Austin, TX 78701-1494 >512-463-9493 >CWortz at tea.state.tx.us > > > >-----Original Message----- >From: David Emerson [mailto:davide at dalyn.co.nz] >Sent: Thursday 2003 May 29 14:25 >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer]Apostrophes in exported spreadsheets > > >The thing is that it didn't happen when I had A97 linked to an A97 >BE. Text cells just had the text in them without the apostrophes. > >Another unusual thing is that some text fields have apostrophes at the >beginning and end of the text, other text fields only have an apostrophe >at >the beginning! > >David > >At 29/05/2003, you wrote: > >David, > > > >That apostrophe tells Excel that what follows in the cell is to be > >treated as text, not numbers. If you want the cell values to be > >treated as numbers, then you need to change the exporting field > >datatypes from varchar to numeric datatypes. > > > >Charles Wortz > >-----Original Message----- > >From: David Emerson [mailto:davide at dalyn.co.nz] > >Sent: Wednesday 2003 May 28 21:17 > >To: dba-SQLServer at databaseadvisors.com > >Subject: [dba-SQLServer]Apostrophes in exported spreadsheets > > > >When I use the following line in an ADP linked to SQL2K, any varchar > >fields have an apostrophe put at the front of the data - > > > >strTableName = "dbo.ttmpLoadAllocateExp" > > > >DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, > >strTableName, "C:\Sheet.xls > > > >Does any one know why, and how can it be avoided? > > > > > >Regards > > > >David Emerson > >DALYN Software Ltd > >25b Cunliffe St, Johnsonville > >Wellington, New Zealand > >Ph/Fax (877) 456-1205 >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com From davide at dalyn.co.nz Thu May 29 18:11:23 2003 From: davide at dalyn.co.nz (David Emerson) Date: Fri, 30 May 2003 11:11:23 +1200 Subject: [dba-SQLServer]Exported spreadsheets not in order In-Reply-To: <5A31F89EC4C79B49B5030FF2EF58E9D202DAC020@ex02.eagle.usaa.c om> Message-ID: <5.2.0.9.0.20030530110739.01a1a0b0@mail.dalyn.co.nz> OK, the only place that seems to have any settings is the User DSN tab. But there is nothing to indicate sort orders (or much else). Part of the problem is that I am not sure what I am looking for? David At 29/05/2003, you wrote: >Control Panel/Data Sources or Control Panel/Administrative Tools/Data Sources > >Robert Djabarov >Senior SQL Server DBA >USAA IT/DBMS >? (210) 913-3148 - phone >? (210) 753-3148 - pager > > > -----Original Message----- >From: David Emerson [mailto:davide at dalyn.co.nz] >Sent: Thursday, May 29, 2003 2:33 PM >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer]Exported spreadsheets not in order > >Thanks. Where do I find these settings? > > >At 29/05/2003, you wrote: > >Check into differences of MDAC level and DSN settings between > >machines. Bottom line, - those are the contributing factors. > > > >Robert Djabarov > >Senior SQL Server DBA > >USAA IT/DBMS > >? (210) 913-3148 - phone > >? (210) 753-3148 - pager > > > > > > -----Original Message----- > >From: David Emerson [mailto:davide at dalyn.co.nz] > >Sent: Wednesday, May 28, 2003 9:43 PM > >To: dba-SQLServer at databaseadvisors.com > >Subject: [dba-SQLServer]Exported spreadsheets not in order > > > >I have another problem with exporting to spreadsheets. I have three > >spreadsheets that are created for three companies within a database. The > >data is first put into a temporary table by a sproc which sorts the records > >in the right order by a varchar field. In two cases when the table is then > >exported to excel they records are still in the same order. In one case > >though the first chunk of records appear at the end of the > >spreadsheet. They are still in the correct order but it is as if they were > >deleted from the top and pasted to the bottom. > > > >It only happens for 1 of the three companies, it consistently happens, and > >to make matters worse, it works fine on my machine, but has the problem on > >another. > > > >Has anyone experienced this before or is it just a plan by psychiatrists to > >drum up more business? > > > > > >Regards > > > >David Emerson > >DALYN Software Ltd > >25b Cunliffe St, Johnsonville > >Wellington, New Zealand > >Ph/Fax (877) 456-1205 > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 From Robert.Djabarov at usaa.com Fri May 30 12:55:59 2003 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Fri, 30 May 2003 12:55:59 -0500 Subject: [dba-SQLServer]Exported spreadsheets not in order Message-ID: <5A31F89EC4C79B49B5030FF2EF58E9D202DAC023@ex02.eagle.usaa.com> Uncheck ANSI NULLS and ANSI WARNINGS settings on your DSN. Robert Djabarov Senior SQL Server DBA USAA IT/DBMS ? (210) 913-3148 - phone ? (210) 753-3148 - pager -----Original Message----- From: David Emerson [mailto:davide at dalyn.co.nz] Sent: Thursday, May 29, 2003 6:11 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Exported spreadsheets not in order OK, the only place that seems to have any settings is the User DSN tab. But there is nothing to indicate sort orders (or much else). Part of the problem is that I am not sure what I am looking for? David At 29/05/2003, you wrote: >Control Panel/Data Sources or Control Panel/Administrative Tools/Data Sources > >Robert Djabarov >Senior SQL Server DBA >USAA IT/DBMS >? (210) 913-3148 - phone >? (210) 753-3148 - pager > > > -----Original Message----- >From: David Emerson [mailto:davide at dalyn.co.nz] >Sent: Thursday, May 29, 2003 2:33 PM >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer]Exported spreadsheets not in order > >Thanks. Where do I find these settings? > > >At 29/05/2003, you wrote: > >Check into differences of MDAC level and DSN settings between > >machines. Bottom line, - those are the contributing factors. > > > >Robert Djabarov > >Senior SQL Server DBA > >USAA IT/DBMS > >? (210) 913-3148 - phone > >? (210) 753-3148 - pager > > > > > > -----Original Message----- > >From: David Emerson [mailto:davide at dalyn.co.nz] > >Sent: Wednesday, May 28, 2003 9:43 PM > >To: dba-SQLServer at databaseadvisors.com > >Subject: [dba-SQLServer]Exported spreadsheets not in order > > > >I have another problem with exporting to spreadsheets. I have three > >spreadsheets that are created for three companies within a database. The > >data is first put into a temporary table by a sproc which sorts the records > >in the right order by a varchar field. In two cases when the table is then > >exported to excel they records are still in the same order. In one case > >though the first chunk of records appear at the end of the > >spreadsheet. They are still in the correct order but it is as if they were > >deleted from the top and pasted to the bottom. > > > >It only happens for 1 of the three companies, it consistently happens, and > >to make matters worse, it works fine on my machine, but has the problem on > >another. > > > >Has anyone experienced this before or is it just a plan by psychiatrists to > >drum up more business? > > > > > >Regards > > > >David Emerson > >DALYN Software Ltd > >25b Cunliffe St, Johnsonville > >Wellington, New Zealand > >Ph/Fax (877) 456-1205 > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com Regards David Emerson DALYN Software Ltd 25b Cunliffe St, Johnsonville Wellington, New Zealand Ph/Fax (877) 456-1205 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From davide at dalyn.co.nz Fri May 30 14:16:31 2003 From: davide at dalyn.co.nz (David Emerson) Date: Sat, 31 May 2003 07:16:31 +1200 Subject: [dba-SQLServer]Exported spreadsheets not in order In-Reply-To: <5A31F89EC4C79B49B5030FF2EF58E9D202DAC023@ex02.eagle.usaa.c om> Message-ID: <5.2.0.9.0.20030531071531.00b2d948@mail.dalyn.co.nz> I appreciate your patience, but I don't see these settings. I am using Windows XP. David At 30/05/2003, you wrote: >Uncheck ANSI NULLS and ANSI WARNINGS settings on your DSN. > >Robert Djabarov >Senior SQL Server DBA >USAA IT/DBMS >? (210) 913-3148 - phone >? (210) 753-3148 - pager > > > -----Original Message----- >From: David Emerson [mailto:davide at dalyn.co.nz] >Sent: Thursday, May 29, 2003 6:11 PM >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer]Exported spreadsheets not in order > >OK, the only place that seems to have any settings is the User DSN >tab. But there is nothing to indicate sort orders (or much else). Part of >the problem is that I am not sure what I am looking for? > >David > >At 29/05/2003, you wrote: > >Control Panel/Data Sources or Control Panel/Administrative Tools/Data > Sources > > > >Robert Djabarov > >Senior SQL Server DBA > >USAA IT/DBMS > >? (210) 913-3148 - phone > >? (210) 753-3148 - pager > > > > > > -----Original Message----- > >From: David Emerson [mailto:davide at dalyn.co.nz] > >Sent: Thursday, May 29, 2003 2:33 PM > >To: dba-sqlserver at databaseadvisors.com > >Subject: RE: [dba-SQLServer]Exported spreadsheets not in order > > > >Thanks. Where do I find these settings? > > > > > >At 29/05/2003, you wrote: > > >Check into differences of MDAC level and DSN settings between > > >machines. Bottom line, - those are the contributing factors. > > > > > >Robert Djabarov > > >Senior SQL Server DBA > > >USAA IT/DBMS > > >? (210) 913-3148 - phone > > >? (210) 753-3148 - pager > > > > > > > > > -----Original Message----- > > >From: David Emerson [mailto:davide at dalyn.co.nz] > > >Sent: Wednesday, May 28, 2003 9:43 PM > > >To: dba-SQLServer at databaseadvisors.com > > >Subject: [dba-SQLServer]Exported spreadsheets not in order > > > > > >I have another problem with exporting to spreadsheets. I have three > > >spreadsheets that are created for three companies within a database. The > > >data is first put into a temporary table by a sproc which sorts the > records > > >in the right order by a varchar field. In two cases when the table is > then > > >exported to excel they records are still in the same order. In one case > > >though the first chunk of records appear at the end of the > > >spreadsheet. They are still in the correct order but it is as if they > were > > >deleted from the top and pasted to the bottom. > > > > > >It only happens for 1 of the three companies, it consistently happens, and > > >to make matters worse, it works fine on my machine, but has the problem on > > >another. > > > > > >Has anyone experienced this before or is it just a plan by > psychiatrists to > > >drum up more business? > > > > > > > > >Regards > > > > > >David Emerson > > >DALYN Software Ltd > > >25b Cunliffe St, Johnsonville > > >Wellington, New Zealand > > >Ph/Fax (877) 456-1205 > > > >_______________________________________________ > >dba-SQLServer mailing list > >dba-SQLServer at databaseadvisors.com > >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >http://www.databaseadvisors.com > > > > > > > >_______________________________________________ > >dba-SQLServer mailing list > >dba-SQLServer at databaseadvisors.com > >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >http://www.databaseadvisors.com > >Regards > >David Emerson >DALYN Software Ltd >25b Cunliffe St, Johnsonville >Wellington, New Zealand >Ph/Fax (877) 456-1205 > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com From davide at dalyn.co.nz Fri May 30 14:19:46 2003 From: davide at dalyn.co.nz (David Emerson) Date: Sat, 31 May 2003 07:19:46 +1200 Subject: [dba-SQLServer]Apostrophes in exported spreadsheets In-Reply-To: Message-ID: <5.2.0.9.0.20030531071756.01f5d5b8@mail.dalyn.co.nz> Further testing has shown that it is only if SQL tables are exported that the apostrophes appear, if I export direct from a sproc then they are not included. David At 29/05/2003, you wrote: >David, > >The apostrophe is an Excel, not an Access, specification for a text >field. Thus Access doesn't need it, but Excel does, so Access puts it >in when you export text strings to Excel. A string delimited by quotes >also indicates a text field to Excel. > >Charles Wortz >Software Development Division >Texas Education Agency >1701 N. Congress Ave >Austin, TX 78701-1494 >512-463-9493 >CWortz at tea.state.tx.us > > > >-----Original Message----- >From: David Emerson [mailto:davide at dalyn.co.nz] >Sent: Thursday 2003 May 29 14:25 >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer]Apostrophes in exported spreadsheets > > >The thing is that it didn't happen when I had A97 linked to an A97 >BE. Text cells just had the text in them without the apostrophes. > >Another unusual thing is that some text fields have apostrophes at the >beginning and end of the text, other text fields only have an apostrophe >at >the beginning! > >David > >At 29/05/2003, you wrote: > >David, > > > >That apostrophe tells Excel that what follows in the cell is to be > >treated as text, not numbers. If you want the cell values to be > >treated as numbers, then you need to change the exporting field > >datatypes from varchar to numeric datatypes. > > > >Charles Wortz > >-----Original Message----- > >From: David Emerson [mailto:davide at dalyn.co.nz] > >Sent: Wednesday 2003 May 28 21:17 > >To: dba-SQLServer at databaseadvisors.com > >Subject: [dba-SQLServer]Apostrophes in exported spreadsheets > > > >When I use the following line in an ADP linked to SQL2K, any varchar > >fields have an apostrophe put at the front of the data - > > > >strTableName = "dbo.ttmpLoadAllocateExp" > > > >DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, > >strTableName, "C:\Sheet.xls > > > >Does any one know why, and how can it be avoided? > > > > > >Regards > > > >David Emerson > >DALYN Software Ltd > >25b Cunliffe St, Johnsonville > >Wellington, New Zealand > >Ph/Fax (877) 456-1205 From CWortz at tea.state.tx.us Fri May 30 14:33:49 2003 From: CWortz at tea.state.tx.us (Wortz, Charles) Date: Fri, 30 May 2003 14:33:49 -0500 Subject: [dba-SQLServer]Apostrophes in exported spreadsheets Message-ID: David, If your sproc is not using the export wizard then you have to insert the apostrophe where and when needed. The export wizard knows about the various datatypes of M$ products and can handle them appropriately. Your sproc only knows what you tell it. Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: David Emerson [mailto:davide at dalyn.co.nz] Sent: Friday 2003 May 30 14:20 To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer]Apostrophes in exported spreadsheets Further testing has shown that it is only if SQL tables are exported that the apostrophes appear, if I export direct from a sproc then they are not included. David At 29/05/2003, you wrote: >David, > >The apostrophe is an Excel, not an Access, specification for a text >field. Thus Access doesn't need it, but Excel does, so Access puts it >in when you export text strings to Excel. A string delimited by quotes >also indicates a text field to Excel. > >Charles Wortz >-----Original Message----- >From: David Emerson [mailto:davide at dalyn.co.nz] >Sent: Thursday 2003 May 29 14:25 >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer]Apostrophes in exported spreadsheets > > >The thing is that it didn't happen when I had A97 linked to an A97 BE. >Text cells just had the text in them without the apostrophes. > >Another unusual thing is that some text fields have apostrophes at the >beginning and end of the text, other text fields only have an >apostrophe at the beginning! > >David > >At 29/05/2003, you wrote: > >David, > > > >That apostrophe tells Excel that what follows in the cell is to be > >treated as text, not numbers. If you want the cell values to be > >treated as numbers, then you need to change the exporting field > >datatypes from varchar to numeric datatypes. > > > >Charles Wortz > >-----Original Message----- > >From: David Emerson [mailto:davide at dalyn.co.nz] > >Sent: Wednesday 2003 May 28 21:17 > >To: dba-SQLServer at databaseadvisors.com > >Subject: [dba-SQLServer]Apostrophes in exported spreadsheets > > > >When I use the following line in an ADP linked to SQL2K, any varchar > >fields have an apostrophe put at the front of the data - > > > >strTableName = "dbo.ttmpLoadAllocateExp" > > > >DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, > >strTableName, "C:\Sheet.xls > > > >Does any one know why, and how can it be avoided? > > > > > >Regards > > > >David Emerson > >DALYN Software Ltd > >25b Cunliffe St, Johnsonville > >Wellington, New Zealand > >Ph/Fax (877) 456-1205 From davide at dalyn.co.nz Fri May 30 15:32:38 2003 From: davide at dalyn.co.nz (David Emerson) Date: Sat, 31 May 2003 08:32:38 +1200 Subject: [dba-SQLServer]Apostrophes in exported spreadsheets In-Reply-To: Message-ID: <5.2.0.9.0.20030531083110.01f618f8@mail.dalyn.co.nz> Sorry Charles. The problem is that apostrophes are being added when we don't want them! See the bottom of the message for the code I am using. David At 30/05/2003, you wrote: >David, > >If your sproc is not using the export wizard then you have to insert the >apostrophe where and when needed. The export wizard knows about the >various datatypes of M$ products and can handle them appropriately. >Your sproc only knows what you tell it. > >Charles Wortz >Software Development Division >Texas Education Agency >1701 N. Congress Ave >Austin, TX 78701-1494 >512-463-9493 >CWortz at tea.state.tx.us > > > >-----Original Message----- >From: David Emerson [mailto:davide at dalyn.co.nz] >Sent: Friday 2003 May 30 14:20 >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer]Apostrophes in exported spreadsheets > > >Further testing has shown that it is only if SQL tables are exported >that >the apostrophes appear, if I export direct from a sproc then they are >not >included. > >David > >At 29/05/2003, you wrote: > >David, > > > >The apostrophe is an Excel, not an Access, specification for a text > >field. Thus Access doesn't need it, but Excel does, so Access puts it > >in when you export text strings to Excel. A string delimited by quotes > > >also indicates a text field to Excel. > > > >Charles Wortz > >-----Original Message----- > >From: David Emerson [mailto:davide at dalyn.co.nz] > >Sent: Thursday 2003 May 29 14:25 > >To: dba-sqlserver at databaseadvisors.com > >Subject: RE: [dba-SQLServer]Apostrophes in exported spreadsheets > > > > > >The thing is that it didn't happen when I had A97 linked to an A97 BE. > > >Text cells just had the text in them without the apostrophes. > > > >Another unusual thing is that some text fields have apostrophes at the > >beginning and end of the text, other text fields only have an > >apostrophe at the beginning! > > > >David > > > >At 29/05/2003, you wrote: > > >David, > > > > > >That apostrophe tells Excel that what follows in the cell is to be > > >treated as text, not numbers. If you want the cell values to be > > >treated as numbers, then you need to change the exporting field > > >datatypes from varchar to numeric datatypes. > > > > > >Charles Wortz > > >-----Original Message----- > > >From: David Emerson [mailto:davide at dalyn.co.nz] > > >Sent: Wednesday 2003 May 28 21:17 > > >To: dba-SQLServer at databaseadvisors.com > > >Subject: [dba-SQLServer]Apostrophes in exported spreadsheets > > > > > >When I use the following line in an ADP linked to SQL2K, any varchar > > >fields have an apostrophe put at the front of the data - > > > > > >strTableName = "dbo.ttmpLoadAllocateExp" > > > > > >DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, > > >strTableName, "C:\Sheet.xls > > > > > >Does any one know why, and how can it be avoided? > > > > > > > > >Regards > > > > > >David Emerson > > >DALYN Software Ltd > > >25b Cunliffe St, Johnsonville > > >Wellington, New Zealand > > >Ph/Fax (877) 456-1205 >_______________________________________________