User Profile
Collapse
-
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. -
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. -
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
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 -
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,
-
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...Leave a comment:
-
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
DougLeave a comment:
-
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.Leave a comment:
-
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... -
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") %>'
-
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">
-
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...Leave a comment:
-
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... -
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.Leave a comment:
-
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,
Leave a comment:
-
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,
Leave a comment:
-
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...Leave a comment:
-
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.Leave a comment:
-
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,
Leave a comment:
-
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
Leave a comment:
No activity results to display
Show More
Leave a comment: