Insert record wizard date format
Hi,
How can i change the default insert from mm/dd/yyyy to uk format dd/mm/yyyy
currently if i insert 08/05/2010 which is the 8th may 2010 in uk it will put it into database as 2010/08/05 which when i retrieve is the 5th august 2010 in uk.
is there a config folder anywhere i can change this?
many thanks
thanks bregent.
it is php/mysql
not sure what that other reply is about after yours but thanks for your advice.
is there no way in dreamweaver to change the preferences like in addt to a specific date format?
thanks
Date: Wed, 19 May 2010 12:25:47 -0600
From: [email protected]
To:
Subject: Dreamweaver Application Development Insert record wizard date format
You didn't mention what DBMS or scripting language you are using.
The best way to get dates from a user is to supply 3 fields for input; day, month, year - then assemble them into the string format that the DBMS is expecting.
>
Similar Messages
-
INSERT & UPDATE changing date format to mm/dd/yyyy!!!
I have INSERT & UPDATE ASP/VB forms which have a date
field which submits to
Access....except when the date is entered as dd/mm/yyyy, it
decides to
convert it to mm/dd/yyyy....absolutely terrific!! :o((
I've added this:
<% Session.LCID = 2057 %>
I've checked the date format, I've done absolutely everything
I can think
of, and can source on the newsgroups, but NOTHING.
What, on earth, is going on??????????????
If anyone can help save me from this madness, please tell me
why this is
happening?
I'm using ASP/VB, with Access on a Windows server and, up
until now, I've
never had this problem.
Here's my INSERT code:
<%@LANGUAGE="VBSCRIPT"%>
<% Session.LCID = 2057 %>
<!--#include file="../Connections/dsnNAME.asp" -->
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" &
Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<%
If (CStr(Request("MM_insert")) = "form1") Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_dsnNAME_STRING
MM_editCmd.CommandText = "INSERT INTO tblNews (newstitle,
newsdate,
newsenddate, thumbnail, largeimage, newstextsnip, newstext,
emailcontact,
urllink, [include]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param1", 202,
1, 75, Request.Form("newstitle")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param2", 135,
1, -1, MM_IIF(Request.Form("newsdate"),
Request.Form("newsdate"), null)) '
adDBTimeStamp
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param3", 135,
1, -1, MM_IIF(Request.Form("newsenddate"),
Request.Form("newsenddate"),
null)) ' adDBTimeStamp
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param4", 202,
1, 75, Request.Form("thumbnail")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param5", 202,
1, 75, Request.Form("largeimage")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param6", 203,
1, 536870910, Request.Form("newstextsnip")) ' adLongVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param7", 203,
1, 536870910, Request.Form("newstext")) ' adLongVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param8", 202,
1, 75, Request.Form("emailcontact")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param9", 202,
1, 75, Request.Form("urllink")) ' adVarWChar
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param10", 5,
1, -1, MM_IIF(Request.Form("include"), 1, 0)) ' adDouble
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "confirm.htm"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0)
Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" &
Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" &
Request.QueryString
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%>
Thanks.
Nath.Well, I've established that it's DW8.0.2 that is causing this
strange
occurence.
Reverted back to previously created versions of my
INSERT/UPDATE form pages
(created in DWMX) and it all works fine!!
I think that makes the whole situation even more frustrating
because I had
HUGE problems with this back in 2003/2004, and resolved it.
Now I've upgraded to DW8.0.2 and it's all gone "ape" again.
<sigh>
Any ideas, looking at the code in my initial post, why this
is happening?
For comparison here is the same INSERT created in DWMX that
WORKS:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/dsnNAME.asp" -->
<%
' *** Edit Operations: declare variables
Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd
Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId
Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" &
Request.QueryString
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert")) = "form1") Then
MM_editConnection = MM_dsnNAME_STRING
MM_editTable = "tblNews"
MM_editRedirectUrl = "confirm.htm"
MM_fieldsStr =
"newstitle|value|newsenddate|value|thumbnail|value|largeimage|value|newstextsnip|value|ne wstext|value|emailcontact|value|urllink|value|include|value"
MM_columnsStr =
"newstitle|',none,''|newsenddate|',none,NULL|thumbnail|',none,''|largeimage|',none,''|new stextsnip|',none,''|newstext|',none,''|emailcontact|',none,''|urllink|',none,''|include|no ne,1,0"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString
<> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" &
Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" &
Request.QueryString
End If
End If
End If
%>
<%
' *** Insert Record: construct a sql insert statement and
execute it
Dim MM_tableValues
Dim MM_dbValues
If (CStr(Request("MM_insert")) <> "") Then
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''") &
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " ("
& MM_tableValues & ")
values (" & MM_dbValues & ")"
If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
This type of thing does my HEAD in.
Nath.
"tradmusic.com" <[email protected]> wrote in
message
news:[email protected]...
>I have INSERT & UPDATE ASP/VB forms which have a date
field which submits
>to Access....except when the date is entered as
dd/mm/yyyy, it decides to
>convert it to mm/dd/yyyy....absolutely terrific!! :o((
>
> I've added this:
> <% Session.LCID = 2057 %>
>
> I've checked the date format, I've done absolutely
everything I can think
> of, and can source on the newsgroups, but NOTHING.
> What, on earth, is going on??????????????
>
> If anyone can help save me from this madness, please
tell me why this is
> happening?
> I'm using ASP/VB, with Access on a Windows server and,
up until now, I've
> never had this problem.
>
> Here's my INSERT code:
>
> <%@LANGUAGE="VBSCRIPT"%>
> <% Session.LCID = 2057 %>
> <!--#include file="../Connections/dsnNAME.asp" -->
> <%
> Dim MM_editAction
> MM_editAction =
CStr(Request.ServerVariables("SCRIPT_NAME"))
> If (Request.QueryString <> "") Then
> MM_editAction = MM_editAction & "?" &
> Server.HTMLEncode(Request.QueryString)
> End If
>
> ' boolean to abort record edit
> Dim MM_abortEdit
> MM_abortEdit = false
> %>
> <%
> ' IIf implementation
> Function MM_IIf(condition, ifTrue, ifFalse)
> If condition = "" Then
> MM_IIf = ifFalse
> Else
> MM_IIf = ifTrue
> End If
> End Function
> %>
> <%
> If (CStr(Request("MM_insert")) = "form1") Then
> If (Not MM_abortEdit) Then
> ' execute the insert
> Dim MM_editCmd
>
> Set MM_editCmd = Server.CreateObject ("ADODB.Command")
> MM_editCmd.ActiveConnection = MM_dsnNAME_STRING
> MM_editCmd.CommandText = "INSERT INTO tblNews
(newstitle, newsdate,
> newsenddate, thumbnail, largeimage, newstextsnip,
newstext, emailcontact,
> urllink, [include]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?,
> MM_editCmd.Prepared = true
> MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param1", 202,
> 1, 75, Request.Form("newstitle")) ' adVarWChar
> MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param2", 135,
> 1, -1, MM_IIF(Request.Form("newsdate"),
Request.Form("newsdate"), null)) '
> adDBTimeStamp
> MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param3", 135,
> 1, -1, MM_IIF(Request.Form("newsenddate"),
Request.Form("newsenddate"),
> null)) ' adDBTimeStamp
> MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param4", 202,
> 1, 75, Request.Form("thumbnail")) ' adVarWChar
> MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param5", 202,
> 1, 75, Request.Form("largeimage")) ' adVarWChar
> MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param6", 203,
> 1, 536870910, Request.Form("newstextsnip")) '
adLongVarWChar
> MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param7", 203,
> 1, 536870910, Request.Form("newstext")) ' adLongVarWChar
> MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param8", 202,
> 1, 75, Request.Form("emailcontact")) ' adVarWChar
> MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param9", 202,
> 1, 75, Request.Form("urllink")) ' adVarWChar
> MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param10", 5,
> 1, -1, MM_IIF(Request.Form("include"), 1, 0)) ' adDouble
> MM_editCmd.Execute
> MM_editCmd.ActiveConnection.Close
>
> ' append the query string to the redirect URL
> Dim MM_editRedirectUrl
> MM_editRedirectUrl = "confirm.htm"
> If (Request.QueryString <> "") Then
> If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) =
0) Then
> MM_editRedirectUrl = MM_editRedirectUrl & "?" &
Request.QueryString
> Else
> MM_editRedirectUrl = MM_editRedirectUrl & "&"
& Request.QueryString
> End If
> End If
> Response.Redirect(MM_editRedirectUrl)
> End If
> End If
> %>
>
> Thanks.
> Nath.
> -
Hy,
I've got a problem when we insert a timestamp to a db.
When I try to start an insert code I get this error:
SQL-Error: ORA-01830: "data format picture ends before converting entire input string"
Insert into ABC_123("dtstamp") values (to_timestamp('31.05.13 09:30:05,000748000 +01:00','DD.MM.RR HH24:MI:SSXFF'));
with this language settings
National Language Support
National
Language Parameter
Value
NLS_CALENDAR
GREGORIAN
NLS_CHARACTERSET
WE8MSWIN1252
NLS_COMP
BINARY
NLS_CURRENCY
€
NLS_DATE_FORMAT
DD.MM.RR
NLS_DATE_LANGUAGE
GERMAN
NLS_DUAL_CURRENCY
€
NLS_ISO_CURRENCY
GERMANY
NLS_LANGUAGE
GERMAN
NLS_LENGTH_SEMANTICS
BYTE
NLS_NCHAR_CHARACTERSET
AL16UTF16
NLS_NCHAR_CONV_EXCP
FALSE
NLS_NUMERIC_CHARACTERS
NLS_SORT
GERMAN
NLS_TERRITORY
GERMANY
NLS_TIME_FORMAT
HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT
DD.MM.RR HH24:MI:SSXFF
NLS_TIMESTAMP_TZ_FORMAT
DD.MM.RR HH24:MI:SSXFF TZR
NLS_TIME_TZ_FORMAT
HH24:MI:SSXFF TZR
I didn't see the error. Maybe somebody can help me.
Thx
Felixef5fe917-5142-4425-a464-94ab111ed87a wrote:
Hy,
I've got a problem when we insert a timestamp to a db.
When I try to start an insert code I get this error:
SQL-Error: ORA-01830: "data format picture ends before converting entire input string"
Insert into ABC_123("dtstamp") values (to_timestamp('31.05.13 09:30:05,000748000 +01:00','DD.MM.RR HH24:MI:SSXFF'));
with this language settings
National Language Support
National
Language Parameter
Value
NLS_CALENDAR
GREGORIAN
NLS_CHARACTERSET
WE8MSWIN1252
NLS_COMP
BINARY
NLS_CURRENCY
€
NLS_DATE_FORMAT
DD.MM.RR
NLS_DATE_LANGUAGE
GERMAN
NLS_DUAL_CURRENCY
€
NLS_ISO_CURRENCY
GERMANY
NLS_LANGUAGE
GERMAN
NLS_LENGTH_SEMANTICS
BYTE
NLS_NCHAR_CHARACTERSET
AL16UTF16
NLS_NCHAR_CONV_EXCP
FALSE
NLS_NUMERIC_CHARACTERS
NLS_SORT
GERMAN
NLS_TERRITORY
GERMANY
NLS_TIME_FORMAT
HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT
DD.MM.RR HH24:MI:SSXFF
NLS_TIMESTAMP_TZ_FORMAT
DD.MM.RR HH24:MI:SSXFF TZR
NLS_TIME_TZ_FORMAT
HH24:MI:SSXFF TZR
I didn't see the error. Maybe somebody can help me.
Thx
Felix
Insert into ABC_123("dtstamp") values (to_timestamp('31.05.13 09:30:05,000748000 +01:00','DD.MM.RR HH24:MI:SSXFF'));
| | | | | | |
| | | | | | +--????
| | | | | +----SS
| | | | |
| | | | +-----MI
| | | |
| | | +-----HH24
| | |
| | +----RR
| |
| +----MM
|
+----DD
The error message means exactly what it says. Your data format string doesn't account for everything in your data string. -
Passing parameter from insert record wizard
I'm using the Insert Record from the Record Insertion Form
Wizard. It works fine in that the record does get inserted into the
table but i am trying to pass a value from one of the fields onto a
confirmation page.
My confirmation page will say something like:
You have just added record <dnum>. Do you want to add
another record?
Is this possible?I am obviously missing something. In editing the link, I have a user parameter of atab. This is the column that is linked in the report. What do I use as the default value. Does it make a difference if the table does or does not have an index on the atab? The PK is an ID.
Please help
Jerry -
Trouble with Import Wizard - Date format
I am trying to import data from an excel file to a table using the Import Wizard. The verification of the import fails on the verification of the date column only, with the message that "Dater columns HOLIDAY_DATE, have invalid or null date formats"
There are no null / blanks in my xls file, and the date format in the xls file is dd/mm/yyyy. When this is imported through the import wizard, the date column shows the data, but the format shows the data in mm/dd/yyyy ??
Is there anything obvious I am doing wrong here?
ThxWell, not really a solution, but a work-around.
I created an extra field in the table, and loaded the date into that string field.
Then just updated the table using the follwoing code...simple, but much faster than trying to work out what the roblem was with the upload.
UPDATE EU_HOLIDAYS
SET HOLIDAY_DATE = TO_DATE(HOLIDAY,'DD/MM/YYYY'); -
How to insert a record with date format field
I tried to execute the query of the below but it showed error and hence i did research and found out i can add a date syntax in front to format it properly.
INSERT INTO EMP (EmpNo, EmpName, Sex, DateOfBirth, Salary, DeptNo)
VALUES ('E001', 'Alex', 'M', '2006-11-08', '1500', 'D001');
When i executed the following query under SQL plus environment, it hang and gave no response. May i know how to solve this problem? Thank you
INSERT INTO EMP (EmpNo, EmpName, Sex, DateOfBirth, Salary, DeptNo)
VALUES ('E001', 'Alex', 'M', DATE '2006-11-08', '1500', 'D001');Normally when we execute a query, it will show the result or response whether it is fail or success or what the error message is. But my situation is that it showed nothing and no response, and cannot execute new query, i cant do anything under that environment and i can only off it by using end task.
-
How can i records with date format using web services?
Hello
I can't record date records using web services. I get no message errors.
I can import string values but no dates (YYYY-MM-DD). Do you have any clue about that?
Regards
Arturohello,
That's the code I'm using to update an opportunity. In the date fields (e.g. dFecha_de_entrega_al_cliente) I've tried to put an specific date in the correct format (If i put it in another format i've got an error message due the wrong format). The CRM accepted the code but it didn't update the values that are different of string.
I don´t know if there is something missing in teh program or if the developer environment is not the adequate.
Regards for your comments
Arturo
Private Sub ActualizarOportunidad(ByVal fila As Data.DataRow, ByVal TipoPersona As String)
Dim oLog As New Log()
Dim IdLog As Integer
Dim NumSerie As String = ""
Try
oLog.Insert_Log("Activación Garantía - Crear Oportunidad", oLog.GetLastIdProceso())
IdLog = oLog.GetLastId()
Dim sr_input As Opportunity.OpportunityUpdate_Input
Dim sr_output As Opportunity.OpportunityUpdate_Output
sr_input = New Opportunity.OpportunityUpdate_Input
Dim sr(1) As Opportunity.OpportunityData
sr(0) = New Opportunity.OpportunityData
NumSerie = fila("NumeroSerie").ToString().Trim()
sr(0).ExternalSystemId = NumSerie
sr(0).OpportunityName = fila("NumeroSerie").ToString().Trim()
sr(0).SalesStage = "Deseo" '"Cerrada/Ganada"
sr(0).dFecha_de_entrega_al_cliente = fila("FechaEmision").ToString().Trim()
sr(0).dFecha_de_facturacin_al_cliente = fila("FechaCompra").ToString().Trim()
sr(0).stNro_Factura = fila("NumeroFactura").ToString().Trim()
sr(0).plActividad_Economica = fila("IdActividad").ToString().Trim()
sr(0).plTipo_de_Venta = fila("TipoCompra").ToString().Trim()
sr(0).CustomObject8ExternalSystemId = fila("ApellidoVendedor").ToString.Trim()
'sr(0).CustomObject8ExternalSystemId = IIf(TipoPersona = "J", fila("DocumentoE").ToString().Trim(), fila("Documento").ToString.Trim())
'sr(0).CustomObject7ExternalSystemId = fila("")
Dim lofsr As Opportunity.ListOfOpportunityData
lofsr = New Opportunity.ListOfOpportunityData
lofsr.Opportunity = sr
sr_input.ListOfOpportunity = lofsr
sr_output = oOpportunity.OpportunityUpdate(sr_input)
oLog.Update_Log(IdLog, "Si", NumSerie, "")
Catch ex As SoapException
Me.txtError.Text = ex.Detail.InnerText.ToString()
oLog.Update_Log(IdLog, "No", NumSerie, ex.Detail.InnerText.ToString())
End Try
End Sub
************************************************************************ -
Insert record incrementing date - low cost
Hi,
I have following record structure
PLAN_LEVEL PERIOD_NUM DAYS OPERATIONSEQ GROUP_ID ALLOY PLANNER_CODE DEPARTMENT_CLASS DEPARTMENT LOAD_HOUR OFFSET_DATE OFFSET
0 1 20 150 525150 INCONEL alloy 625 WIRE ROD CD WP 8.45402793 3/19/2007 14
0 1 20 140 525150 INCONEL alloy 625 WIRE ROD CD BA 4.586287974 3/17/2007 30
0 1 20 90 525150 INCONEL alloy 625 WIRE ROD MM MW2 0.750050215 3/12/2007 51
0 1 20 70 525150 INCONEL alloy 625 WIRE ROD MM M2M 0.027779638 3/12/2007 72
1 1 20 160 525150 INCONEL alloy 625 WIRE ROD PMD DPP 1.453799581 3/4/2007 101
1 1 20 140 525150 INCONEL alloy 625 WIRE ROD CHP CHP 0.97472359 3/2/2007 132
1 1 20 130 525150 INCONEL alloy 625 WIRE ROD CHP SG 4.873617025 2/25/2007 168
1 1 20 120 525150 INCONEL alloy 625 WIRE ROD CHP CHP 1.091515669 2/24/2007 205
1 1 20 110 525150 INCONEL alloy 625 WIRE ROD PMD PM 0.210131401 2/24/2007 242
1 1 20 90 525150 INCONEL alloy 625 WIRE ROD PMD PM 0.262927179 2/18/2007 285
1 1 20 60 525150 INCONEL alloy 625 WIRE ROD B30 ESR 15.18807308 2/15/2007 331
1 1 20 20 525150 INCONEL alloy 625 WIRE ROD VIM VIM 2.191847409 2/12/2007 380there is days column in the table i just need to replicate/insert above data into same table incrementing offset_date.
e.g.
as days value is 20 i have to insert above record group 20 times and increment offset_date by 1 every time so...
for I 1..days here is 20
insert table
offset_date+1 for each record value in this case 12 recordso total insert for this record group will be 12*20 and for each data set it should increase offset_date+1
is there any low cost ( good performance )solution than looping through it.
thanks in advanceMay be better:
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Connected as SYS
SQL>
SQL> drop table t;
Table dropped
SQL> create table t(i number, d1 date, offset number);
Table created
SQL> insert into t values(1, sysdate - 37, 3 );
1 row inserted
SQL> insert into t values(2, sysdate - 34, 7 );
1 row inserted
SQL> select * from t;
I D1 OFFSET
1 26.12.2006 3
2 29.12.2006 7
SQL> SELECT t.i, t.d1 + t2.i - 1, t.offset
2 FROM t
3 ,(SELECT rownum i
4 FROM dual
5 CONNECT BY LEVEL <= (SELECT MAX(offset) FROM t)) t2
6 WHERE t.offset + 1 >= t2.i
7 ORDER BY t.i, t.d1 + t2.i - 1;
I T.D1+T2.I-1 OFFSET
1 26.12.2006 3
1 27.12.2006 3
1 28.12.2006 3
1 29.12.2006 3
2 29.12.2006 7
2 30.12.2006 7
2 31.12.2006 7
2 01.01.2007 7
2 02.01.2007 7
2 03.01.2007 7
2 04.01.2007 7
11 rows selected
SQL> drop table t_temp;
drop table t_temp
ORA-00942: table or view does not exist
SQL> CREATE TABLE t_temp AS
2 SELECT t.i, t.d1 + t2.i - 1 d1, t.offset
3 FROM t
4 ,(SELECT rownum i
5 FROM dual
6 CONNECT BY LEVEL <= (SELECT MAX(offset) FROM t)) t2
7 WHERE t.offset + 1 >= t2.i;
Table created
SQL> SELECT * FROM t_temp;
I D1 OFFSET
1 26.12.2006 3
2 29.12.2006 7
1 27.12.2006 3
2 30.12.2006 7
1 28.12.2006 3
2 31.12.2006 7
1 29.12.2006 3
2 01.01.2007 7
2 02.01.2007 7
2 03.01.2007 7
2 04.01.2007 7
11 rows selected
SQL> -
Insert record via data tab of table detail display
I am using SQL Developer 3.0.04
When I tries to insert more than 200 rows into a table via data tab of table detail display, it takes more than 8 minutes. It takes more than 19 minutes for 400+ rows. It is slow and it is not so slow in previous version (e.g. 1.5.4)
Had anyone experienced the same issue and is there any workaround (other than loading data via SQL loader and stop using SQL Developer)?
[Timer of SQL Developer 3.0| http://i.imgur.com/KVAdI.png]I've seen this also sometimes but i rarely load large amount of data using SQLDeveloper anyway.
Please make sure you have patch1 installed and provide information on the database used.
You can check if patch1 is installed at the
Help -> About -> Extensionyou should find a "SQL Developer Patch" entry there. -
Built in Insert record wizard php application
Dreamweaver has an built in application object that allows
you to insert data from a form directly to a database. After
submitting you can go to a web page. In the code there is something
like this $insertGoTo = "yourpage.htm". What I would like to do is
make that open a page in a blank window. I have tried several
different things such as a variable, adding target, adding a href
and nothing has worked.
I appreciate any help. Thanks.I ran into the same sort of situation where I wanted to
redirect to a page and send form information. It won't work if you
just change the redirect URL.
Have you tried adding the target where the redirect URL is
appended? This worked for me. See below.
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString
<> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" &
Request.QueryString <--- add the target here!
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" &
Request.QueryString <---and here
End If
End If
Good luck!
Sherry -
Insert Record not saving values
Hi,
I am extremely new to Dreamweaver. I am using MX2004.
I am trying to work with a remote database that I created in
MySQL and I am using PHP.
I created a PHP page added my form, added my input fields,
and used the Insert Record wizard to get to my database on the
server. I also went to the columns section and where it says
‘Fieldname’ Does Not Get a Value. I went and chose my
value from the drop-down Value box. It now says
‘Fieldname’ Gets Value From
‘FORM.Fieldname’ as ‘Text’ I have done that
for all the columns that I am asking the users to fill in including
the fields that are NOT NULL.
The problem is once I test it, it is not putting the data in
the database. When I go back and look at my columns in the Insert
Record Server Behaviors, many of my columns have reverted to
‘Fieldname’ Does Not Get a Value.
For some reason my values are not being saved.
Can someone help with this?
Thanks,
SocapriceThanks Mike. I've sloghtly modified my question and reposted
here:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=263&threadid =1322354&enterthread=y
Do you have any thoughts on this?
Cheers,
Roger. -
PHP URL Variable from Insert Record Issue
I have a very simplistic forum style website I have put together. Everything is functionally properly except for one aspect. The basic structure is a page that lists the existing threads (ie: ThreadA, ThreadB, and ThreadC). I have the name of these threads stored in a MySQL database table that is used to generate a repeating dynamic table to grow as the number of threads increases. If the user clicks on one of these links they are taken to a page that displays all of the comments pertaining to that thread. All of the comments are stored in another MySQL database table. I perform a query on this comments page to filter the information in the comments database by the thread name which is passed over from the first page via a URL variable. The link attached to the name of the thread in the repeating table that generates the URL variable is "comments.php?thread=<?php echo $row_threads['threadName']; ?>" This works perfectly, If the user clicks on ThreadB they are taken to the comments page where only the comments pertaining to ThreadB have been filtered and displayed. After the user inserts a comment form ThreadB the comments page reloads displaying the newly created comment.
Also, on the first page, the user has the option to create a new thread; call it ThreadD. The name of this new thread has to be inserted into two tables; one in the master threads table and one in the comments page any time someone adds a comment. (I'm sure there is a better way to structure this, but this was all I could figure out and for my purposes at hand it is sufficient). When the user is taken to this new comment page I have a query set up to pull the last entry in the threads table from the logged in user, ie the newly created thread topic. I have dragged this query to the page to make sure it is pulling the correct thread heading, and it works just fine. What I'm wanting to have happen is after the user enters the first comment I'm wanting them to be redirected to the main comments page with their new comment listed; giving the illusion that the new comment and existing comments page are the same. I'm trying to pass the newly created thread name, ThreadD, in the URL to the main comments page just like I do if they select it from the existing threads page. Under the insert record wizard I click the 'browse' button to select the comments.php page. I then select 'parameters' to add the thread name query as the URL parameter. The generated code is "comments.php?thread=" . $row_threadName['threadName'] . "". The user does go to the main comments page but the URL variable is not coming with it. What I'm left with in the address bar is ..."/comments.php?thread=&" , but it should be ..."comments.php?thread=ThreadD". I tried copying and pasting the URL link from the existing threads page since that works perfectly, and when I do that the main comments page shows up blank after being redirected from the new comments page. If I hard code this, for testing purposes, into the redirect after insertion section (ie: "comments.php?thread=ThreadD") everything works perfectly and the URL in the address bar of the main comments page is "...comments.php?thread=ThreadD&" I noticed the extra "&", but didn't give it much thought since the site is giving me the behavior I'm looking for. My question is, how do I get this new comment page to pass the variable of the newly created thread name to the main comments page to behave like it does when the thread is selected from the list of existing threads? I know it has to do with how the URL variable is either being generated or built from my query, or how I have it listed in the redirect section of the insert wizard, but I can't figure out where I am going wrong. Please let me know if there are any questions or if I need to clarify any aspect. Any and all help is always appreciated. Thank you.Ok, so just to summarize so I am understanding this correctly. You have an ordering page for tires/wheels. A customer places an order for tires/wheels and the data is submitted successfully and this includes a symbol for measurement (in.). But on another summary page the symbol is returning a blank value.
If this is correct we need to see:
- First, the code that is inserting the symbol to the database table in question
- Second, the query and code where you are printing the data to the screen. -
Validate 2 E-mail address fields in insert record form
Hello,
I have used the Insert Record Form Wizard to create a form, including using the Validate Form Server Behavior to validate many fields.
I can't figure out how to compare & validate 2 E-mail address fields.
After the form was created I opened the existing Validate Form Server Behavior - Advanced tab and built the condition {sub_email2} != {sub_email} but this had no affect on submitting the form.
The other thing I tried was creating a new Compare Transaction Field behavior with the same condition {sub_email2} != {sub_email}, this also seemed to have no affect.
I am just a beginner, so I admit to not really knowing what I'm doing, for me ADDT has been a great aid.
The other thing I noticed, when I tried both the items above, besides not affecting being able to submit the form with different E-mail addresses. The red asterisks indicating a required field, would disappear.
Here is the form http://www.oescahealthregistry.org/forms/pedigree_submission.php this version of the form does NOT include either of my attempts to validate the E-mail fields.
Thanks in advance for your help.
DennisHi,
A compare statement should work fine. As an example I made small form that inserts name and email (2 fields) using Insert record wizard.
Name field is required, email field is required and checks that its a valid email structure ([email protected]). I then finish the wizard.
<input type="text" name="email" id="email" value="<?php echo KT_escapeAttribute($row_rsemail['email']); ?>" size="32" />
<?php echo $tNGs->displayFieldHint("email");?> <?php echo $tNGs->displayFieldError("email", "email"); ?>
I then add the extra field to the form that the 2nd email will be entered into, this one I called email2, I then copied the display hint and fielderror code from the first email and placed it behind the 2nd email box and changed the text to reflect email2. Which probably doesnt matter but I put it there anyway.
<input name="email2" type="text" id="email2" size="32" />
<?php echo $tNGs->displayFieldHint("email2");?> <?php echo $tNGs->displayFieldError("email2", "email2"); ?>
Now that I have both email fields in the form, I go to the developer tools under server behavior and select compare transactions fields under form validation.
I hit the + to add a field I then choose email for field, then == for condition, then {POST.email2} for compare to. I enter in an error message and hit ok.
Thats it the form is ready.
The first email field will check against email validation and the 2nd email will check against the first email.
I hope that helps.
Take note that the database actually only has 2 fields to enter data. Then 2nd email field is only for validation.
Message was edited by: Albert S. -
I am using the insert record wizard in Dreamweaver 8 to
insert a record into a visual Foxpro table. It works until I add a
date field. Then I get the following error.
Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC Visual FoxPro Driver]Data type mismatch.
POST Data:
reqid=9&req_date=6%2F26%2F2006&system=None&priority_u=1&MM_insert=form1
If I take the date field out it will write the record fine.
If anyone has any Ideas on how to write the date to a foxpro table
I would greatly appreciate it.How are you doing the FoxPro insert now?
Can you reply back with the code you are performing?
I work with FoxPro data all the time and have found the dates
to be rather tricky sometimes. But it can be done. Have you looked
into the function createOdBCDate? -
I have a small ASP form that's been working fine with MS
Access database. I made some changes. Then I started getting HTTP
500 Internal Server Error when I'd click the submit button. I've
tried the following:
Checked that all files are there and working, i.e. connection
file, database file, ASP file, file for after submission.
Checked and tested the ODBC record.
Checked the driver on the server.
Created a new connection file from scratch.
Let Dreamweaver Insert Record Wizard create a new form from
scratch.
Intalled Dreamweaver on my server and tested DB connectivity,
etc. from the server itself.
Everything seems to work perfectly until you go to the live
page and submit the form.
Any help would be appreciated.alanray wrote:
> I have a small ASP form that's been working fine with MS
Access database. I
> made some changes. Then I started getting HTTP 500
Internal Server Error when
> I'd click the submit button. I've tried the following:
> Checked that all files are there and working, i.e.
connection file, database
> file, ASP file, file for after submission.
> Checked and tested the ODBC record.
> Checked the driver on the server.
> Created a new connection file from scratch.
> Let Dreamweaver Insert Record Wizard create a new form
from scratch.
> Intalled Dreamweaver on my server and tested DB
connectivity, etc. from the
> server itself.
>
> Everything seems to work perfectly until you go to the
live page and submit
> the form.
>
> Any help would be appreciated.
You first need to provide a more detailed error message. In
internet
explorer advanced options turn off user friendly errors. Then
run the
page again and see what it says.
Dooza
Posting Guidelines
http://www.adobe.com/support/forums/guidelines.html
How To Ask Smart Questions
http://www.catb.org/esr/faqs/smart-questions.html
Maybe you are looking for
-
Opinion of ur zen micro experience........
i havent even recieved my micro and i've been havin second thoughts on my buy......im not sure if i wanna even try it in hopes of reselling it and just gettin a ipod mini.......i dont want to have to troubleshoot a brand new mp3 player just to get it
-
Can you resize Video Skins in Flash CS3
I am inserting a Flash Video into a file and trying to include the automatic skin from the import dialogue box. If I have a small video (say around 180 pixels wide), the skin juts out obtrusively off to the sides. Is there a way to manage the size of
-
Want to know about maccleaner what is this
hi may i know about maccleaner
-
Both blocking and non-blocking io
I'm wondering if this scenario is possible with the new nio classes: I have a caching server. Clients connect to the server and occasionally send requests for objects. I'd like to use the nio non-blocking APIs to detect that there is a read pending o
-
Set methods or typecasting objects with JAXB
Hi everybody, I am working on an example with the JAXB, which in many ways is an extraordinary technology, but I have quite a problem. I have compiled my schema with xjc - no problem, but i am missing to setMethods both of which is regarding a List.