User Profile

Collapse

Profile Sidebar

Collapse
dougancil
dougancil
Last Activity: Oct 17 '11, 02:24 PM
Joined: Apr 13 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • dougancil
    started a topic Changing Admins to standard users

    Changing Admins to standard users

    Is there a script that can be run to change a admin user to a standard user? I have a group of users who were given admin rights that don't need them and rather than do this manually, I'd prefer to do it with a script if at all possible.
    See more | Go to post

  • Rabbit, I don't want the user to have to enter anything other than the start time, based on that, I want to calculate what the end of the day is, store that as a variable and pass that to my sql server. Even though the end of the day is always 11:59:59, since I don't know the time that the user will be entering as the start time, I have no way to calculate that. Which is what I'm trying to do.
    See more | Go to post

    Leave a comment:


  • Rabbit,

    Specifically, here's what I'm doing:

    Code:
    Try
                If DateTime.TryParse(dateTextBox.Text, myDate) Then
                    'Conversion was successful, the data is now in myDate
                    newDate = myDate.AddDays(1)
                Else
                    errorlabel.Text = "Invalid Date"
                End If
    and what I don't know how...
    See more | Go to post

    Leave a comment:


  • Getting end of day from databox entered variable

    I have a web page that has a text box where customers can enter a date/time which is stored as a variable (@scheddate) which then I need to calculate the end of the day no matter what time they enter there. Is there a simple way to do that?

    Thank you

    Doug
    See more | Go to post

  • dougancil
    started a topic Using a max for the Added Date

    Using a max for the Added Date

    I have the following query:

    Code:
    SELECTSELECT FirstListing,OnCallStart,OnCallEnd, Initials
    FROM
    (
    SELECT
        moncallAdd.FirstListing,
        DATEADD(MINUTE, mOnCallAdd.StartOnCallTime,
                DATEADD(DAY, mOnCallAdd.StartOnCallDate, '12/31/1899')) AS OnCallStart,
        DATEADD(MINUTE, mOnCallAdd.duration,
                DATEADD(MINUTE, mOnCallAdd.StartOnCallTime,
    ...
    See more | Go to post

  • dougancil
    replied to Connecting to a SQL database or Linking
    Zepp,

    The posting of the data to SQL is where I was lost. I'm new to writing in VBA and have no idea how to post that data to sql. As far as the SQL update part, that code was written for me and the requirements have since changed. That was written with the assumption that a record would not be present, but I realized that would only be true once. Lastly, with the batchId, that's supposed to be the frame value from that form, so if a...
    See more | Go to post
    Last edited by NeoPa; Sep 7 '11, 09:35 PM. Reason: Added the mandatory [CODE] tags

    Leave a comment:


  • dougancil
    replied to Connecting to a SQL database or Linking
    Neo,

    The Main form is the front end and the second form is the backend. Pat, I'll try to set up the DSN for that server today, what about the rest of the code, once the tables are linked, am I able to save the access table to the SQL table, add the values from my frame and then timestamp the data?

    Thank you

    Doug
    See more | Go to post

    Leave a comment:


  • dougancil
    replied to Connecting to a SQL database or Linking
    Well I know that you can create linked tables in access, and what I'd like to do is link the current access database (which will be a localized database) to a SQL database which will be networked.
    See more | Go to post

    Leave a comment:


  • dougancil
    started a topic Connecting to a SQL database or Linking

    Connecting to a SQL database or Linking

    have an application that I'm trying to finish in VBA, and as I've never written in it, it's a bit challenging to me. I've written some in VB but the syntax isn't the same between the two for some things. Essentially, here's the logic (or lack of) that I'm trying to accomplish with this task. This is a payroll program that was written by someone who is no longer with our organization. I am trying to finalize this, and realized that when reviewing...
    See more | Go to post

  • dougancil
    started a topic passing variables between pages
    in .NET

    passing variables between pages

    I am trying to pass a variable between two web pages, and this doesn't work consistently. I have the following code in my main page:

    Code:
       <asp:TemplateField HeaderText="Firstlisting" SortExpression="Firstlisting"> 
        <ItemTemplate> 
            <asp:HyperLink ID="Firstlisting" runat="server" Text='<%# Eval("Firstlisting") %>'
    ...
    See more | Go to post

  • Index (zero based) must be greater than or equal to zero

    I have the following code:

    Code:
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    ...
    See more | Go to post

  • dougancil
    replied to removing redudant data
    Rabbit,

    I've fixed the syntax error, but I'm still seeing duplicate data. I've tried union, left join, inner join and I feel like I'm close but I'm still missing something. What this query needs to do is to compare the moncalladd table to the moncalldelete table for exact matches of oncallstart, oncallend, firstlisting, schedname, and then ONLY show the adds with the latest datetime added that are between sometime in the past and the...
    See more | Go to post

    Leave a comment:


  • dougancil
    started a topic SQL Connection String in VBA

    SQL Connection String in VBA

    I have an application that I'm trying to finish in VBA, and as I've never written in it, it's a bit challenging to me. I've written some in VB but the syntax isn't the same between the two for some things. Essentially, here's the logic (or lack of) that I'm trying to accomplish with this task. This is a payroll program that was written by someone who is no longer with our organization. I am trying to finalize this, and realized that when reviewing...
    See more | Go to post

  • dougancil
    replied to removing redudant data
    I did check my parentheses. I can't see any mismatched pairs. As far as the subquery, all I'm concerned with right now is getting it to work. I can go back and fix it later.
    See more | Go to post

    Leave a comment:


  • dougancil
    replied to removing redudant data
    what would be a better way to subquery out the first query then? Also I've removed the max after the left join. Now my query looks like this:

    Code:
    SELECT a.FirstListing, a.AddStart, a.OnCallStart, a.OnCallEnd, a.Activity
    FROM 
    	(
    	SELECT	OCA.FirstListing,
    			MAX(Dateadd(MINUTE, OCA.addtime,DateAdd(Day,OCA.adddate,'12/31/1899'))) as AddStart,
    			DATEADD(MINUTE, OCA.StartOnCallTime,DATEADD(DAY, OCA.StartOnCallDate,
    ...
    See more | Go to post

    Leave a comment:


  • dougancil
    replied to removing redudant data
    Ok here's the query as it is now, but I'm still missing something because now I get the error: Server: Msg 156, Level 15, State 1, Line 14
    Incorrect syntax near the keyword 'AS'.
    Server: Msg 156, Level 15, State 1, Line 27
    Incorrect syntax near the keyword 'AS'.

    Code:
    SELECT a.FirstListing, a.AddStart, a.OnCallStart, a.OnCallEnd, a.Activity
    FROM 
    	(
    	SELECT	OCA.FirstListing,
    			MAX(Dateadd(MINUTE,
    ...
    See more | Go to post

    Leave a comment:


  • dougancil
    replied to removing redudant data
    Ok I'm obviously missing something simple then with my syntax,

    I now have this as my group by clause:
    group by mdr.dbo.mOnCall Add.FirstListin g,mdr.dbo.mOnCa llAdd.StartOnCa llDate,
    mdr.dbo.mOnCall Add.StartOnCall Time, mdr.dbo.mOnCall Add.StartOnCall Date,
    mdr.dbo.mOnCall Add.StartOnCall Time, mdr.dbo.mOnCall Add.Duration

    and get this error:
    The column prefix 'mdr.dbo.mOnCal lAdd' does not match with...
    See more | Go to post

    Leave a comment:


  • dougancil
    replied to removing redudant data
    When I try this:
    group by moncalladd.firs tlisting

    I get this error:

    The column prefix 'moncalladd' does not match with a table name or alias name used in the query.

    when I try a.firstlisting

    I get this error:

    Column 'a.AddStart' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
    See more | Go to post

    Leave a comment:


  • dougancil
    replied to removing redudant data
    Rabbit,
    What I have is this:
    Code:
    SELECT a.* FROM 
     (SELECT
         moncallAdd.FirstListing,
          max (Dateadd(MINUTE, moncalladd.addtime,
                 DateAdd(Day,moncalladd.adddate,'12/31/1899'))) as AddStart,
         DATEADD(MINUTE, mOnCallAdd.StartOnCallTime,
                 DATEADD(DAY, mOnCallAdd.StartOnCallDate, '12/31/1899')) AS OnCallStart,
         DATEADD(MINUTE, mOnCallAdd.duration,
    ...
    See more | Go to post

    Leave a comment:


  • dougancil
    replied to removing redudant data
    Rabbit,

    Sorry I won't put you through that again. What I mean by the latest is this for example, in my last dataset I had these entries:
    Code:
    SAMC, WESTLAKE, SETON SW - SIMMONS    2011-07-19 11:14:00.000    2011-08-24 07:00:00.000    2011-08-24 18:00:00.000    Added
     SAMC, WESTLAKE, SETON SW - SIMMONS    2011-07-19 11:23:00.000    2011-08-24 13:00:00.000    2011-08-24 18:00:00.000    Added
     SAMC, WESTLAKE, SETON
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...