Showing posts with label form. Show all posts
Showing posts with label form. Show all posts

Friday, March 23, 2012

Frontpage 2000 AND SQL Server 7

Hi,
Well I'm brand new to frontpage and SQL so I'm probably doing something
really stupid... but here's the problem. I have created a form that
saves it's information to an SQL server databse. So I created all the
fields on the form and created corresponding columns in a a table in
the SQL database. All is working fine except for 2 scrolling text box
fields. When I try to associate those fields with the columns in the
SQL Databse, frontpage tells me that the fields do not match - I have
tried changing the column type from char to varchar and others but it
still won't work. All other fields that have radio buttons and text
boxes work ok with char. Any ideas would be gratefully appreciated,
Thanks,
Micheal(mickrourke@.yahoo.com) writes:
> Well I'm brand new to frontpage and SQL so I'm probably doing something
> really stupid... but here's the problem. I have created a form that
> saves it's information to an SQL server databse. So I created all the
> fields on the form and created corresponding columns in a a table in
> the SQL database. All is working fine except for 2 scrolling text box
> fields. When I try to associate those fields with the columns in the
> SQL Databse, frontpage tells me that the fields do not match - I have
> tried changing the column type from char to varchar and others but it
> still won't work. All other fields that have radio buttons and text
> boxes work ok with char. Any ideas would be gratefully appreciated,

Hey, I use Frontpage for making my web pages, but I have no idea you make
forms that you associate with a database (and I don't really want to know).

I think you are better off asking in a Frontpage newsgroup.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||mickrourke@.yahoo.com wrote:

> Hi,
> Well I'm brand new to frontpage and SQL so I'm probably doing something
> really stupid... but here's the problem. I have created a form that
> saves it's information to an SQL server databse. So I created all the
> fields on the form and created corresponding columns in a a table in
> the SQL database. All is working fine except for 2 scrolling text box
> fields. When I try to associate those fields with the columns in the
> SQL Databse, frontpage tells me that the fields do not match - I have
> tried changing the column type from char to varchar and others but it
> still won't work. All other fields that have radio buttons and text
> boxes work ok with char. Any ideas would be gratefully appreciated,
> Thanks,
> Micheal

Try Text or NText.sql

Wednesday, March 21, 2012

from view inserts the value of the last inserting at page reload a second time

Hi folks,

After getting a form view inserting some values into a mdb file, it inserts the same values a second time on page reload.

How may I cure this? Any suggestions?

VB Code is below.

many thanks in advance

Rosi

1<%@. Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="km_Eingabe.aspx.vb"Inherits="km_Eingabe" title="km-Eingabe" %>2<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">3 <table style="width: 750px; height: 210px">4 <tr>5 <td style="height: 38px">6 </td>7 <td style="height: 38px">8 <asp:DropDownList ID="dropdownlist1" runat="server" AutoPostBack="True" DataSourceID="AccessDataSource2"9 DataTextField="polKennz" DataValueField="polKennz">10 </asp:DropDownList>11 </td>12 <td style="height: 38px">13 </td>14 </tr>15 <tr>16 <td style="height: 235px">17 </td>18 <td style="height: 235px" valign="top">19   20 <asp:FormView ID="FormView1" runat="server" CellPadding="4" DataSourceID="SqlDataSource1"21 ForeColor="#333333">22 <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />23 <EditRowStyle BackColor="#999999" />24 <EditItemTemplate>2526 </EditItemTemplate>27 <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />28 <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />29 <EmptyDataTemplate>30 keine Daten vorhanden31 <br />32 <asp:LinkButton ID="NewButton" runat="server" CommandName="New" Text="Neuer Eintrag"></asp:LinkButton>33 </EmptyDataTemplate>34 <InsertItemTemplate>35 Datum:36 <asp:TextBox ID="DatumTextBox" runat="server" Text='<%# Bind("Datum", "{0:d}") %>'>37 </asp:TextBox>38 <br />39 Fahrer:40 <asp:TextBox ID="FahrerTextBox" runat="server" Text='<%# Bind("Fahrer") %>'>41 </asp:TextBox>42 <br />43 polKennz:44 <asp:TextBox ID="polKennzTextBox" runat="server" Text='<%# Bind("polKennz") %>'>45 </asp:TextBox>46 <br />47 neuer_Eintrag:48 <asp:TextBox ID="neuer_EintragTextBox" runat="server" Text='<%# Bind("neu") %>'></asp:TextBox>49 <br />50 aktuell:51 <asp:TextBox ID="aktuellTextBox" runat="server" Text='<%# Bind("aktuell") %>'></asp:TextBox> <br />52 <br />53 <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"54 Text="Einfügen" OnClick="InsertButton_Click">55 </asp:LinkButton> 56 <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"57 Text="Abbrechen">58 </asp:LinkButton>59 </InsertItemTemplate>60 <ItemTemplate>61 Datum:62 <asp:Label ID="DatumLabel" runat="server" Text='<%# Bind("Datum") %>'></asp:Label><br />63 Fahrer:64 <asp:Label ID="FahrerLabel" runat="server" Text='<%# Bind("Fahrer") %>'></asp:Label><br />65 polKennz:66 <asp:Label ID="polKennzLabel" runat="server" Text='<%# Bind("polKennz") %>'></asp:Label><br />67 neu:68 <asp:Label ID="neuLabel" runat="server" Text='<%# Bind("neu") %>'></asp:Label><br />69 lfdNr:70 <asp:Label ID="lfdNrLabel" runat="server" Text='<%# Eval("lfdNr") %>'></asp:Label><br />71 aktuell:72 <asp:Label ID="aktuellLabel" runat="server" Text='<%# Bind("aktuell") %>'></asp:Label><br />73 Dienststelle:74 <asp:Label ID="DienststelleLabel" runat="server" Text='<%# Bind("Dienststelle") %>'></asp:Label><br />75 <asp:LinkButton ID="NewButton" runat="server" CommandName="New" Text="Neuer Eintrag"></asp:LinkButton>76 </ItemTemplate>77 <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />78 </asp:FormView>79 </td>80 <td style="height: 235px">81 </td>82 </tr>83 <tr>84 <td>85 </td>86 <td>87 </td>88 <td>89 </td>90 </tr>91 </table>92<asp:AccessDataSource ID="AccessDataSource2" runat="server" DataFile="~/App_Data/KfzDaten_Ansicht.mdb"93 SelectCommand="SELECT DISTINCT [polKennz] FROM [qry_KennzeichenAlle_ohne_ausgesondert]">94 </asp:AccessDataSource>95 <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/KfzDaten_Ansicht.mdb"96 SelectCommand="SELECT DISTINCT [Datum], [Nutzer], [Fahrer], [polKennz], [aktuell], [neu], [gefahren] FROM [qry_Fahrtenbuch_letzter_Eintrag_pro_Kfz] WHERE ([polKennz] = ?)">97 <SelectParameters>98 <asp:ControlParameter ControlID="DropDownList1" Name="polKennz" PropertyName="SelectedValue"99 Type="String" />100 </SelectParameters>101 </asp:AccessDataSource>102 <asp:SqlDataSource ID="SqlDataSource1" DataSourceMode="DataSet" ConflictDetection="CompareAllValues" InsertCommandType="Text" runat="server" ConnectionString="<%$ ConnectionStrings:KfzDaten_Ansicht_mdbConnectionString %>" ProviderName="<%$ ConnectionStrings:KfzDaten_Ansicht_mdbConnectionString.ProviderName %>"103 InsertCommand="INSERT INTO Tab_import_Fahrtenbuch([Datum], [Fahrer], [polKennz], [neu], [aktuell]) VALUES (@.Datum, @.Fahrer, @.polKennz, @.Eingabe_neu, @.Eingabe_aktuell )" >104 <SelectParameters>105 <asp:ControlParameter ControlID="dropdownlist1" Name="newparameter" PropertyName="SelectedValue" />106 </SelectParameters>107 <InsertParameters>108 <asp:FormParameter FormField="DatumTextBox" Name="Datum" Type="string" />109 <asp:FormParameter FormField="FahrerTextBox" Name="Fahrer" Type="string" />110 <asp:FormParameter FormField="polKennzTextBox" Name="polKennz" Type="string" />111 <asp:FormParameter FormField="neuer_EintragTextBox" Name="neu" Type="Int32" ConvertEmptyStringToNull="false" />112 <asp:FormParameter FormField="aktuellTextBox" Name="aktuell" Type="Int32" ConvertEmptyStringToNull="false" Direction="Input" />113 </InsertParameters>114 </asp:SqlDataSource>115     116</asp:Content>117118

Hi Rosi,

It seems that the code has been re-executed when the page re-loads. So you may use "IsPostBack" property to provent the re-execute phenomenon.

If this does not answer your question, pls feel free to reply. Thanks!

|||

HiNai-Dong Jin

Thanks for your answer.

I'm doing my first steps with this stuff. How to use that "IsPostBack"?

Many thanks for any suggestions.

Rosi

|||

Hi Rosi,

Can you show me the km_Eingabe.aspx.vb(code-behind file) ?

Thanks!

|||

RosiRonja:

Hi folks,

After getting a form view inserting some values into a mdb file, it inserts the same values a second time on page reload.

How may I cure this? Any suggestions?

VB Code is below.

many thanks in advance

Rosi

1<%@. Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="km_Eingabe.aspx.vb"Inherits="km_Eingabe" title="km-Eingabe" %>
2<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
3 <table style="width: 750px; height: 210px">
4 <tr>
5 <td style="height: 38px">
6 </td>
7 <td style="height: 38px">
8 <asp:DropDownList ID="dropdownlist1" runat="server" AutoPostBack="True" DataSourceID="AccessDataSource2"
9 DataTextField="polKennz" DataValueField="polKennz">
10 </asp:DropDownList>
11 </td>
12 <td style="height: 38px">
13 </td>
14 </tr>
15 <tr>
16 <td style="height: 235px">
17 </td>
18 <td style="height: 235px" valign="top">
19
20 <asp:FormView ID="FormView1" runat="server" CellPadding="4" DataSourceID="SqlDataSource1"
21 ForeColor="#333333">
22 <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
23 <EditRowStyle BackColor="#999999" />
24 <EditItemTemplate>
25
26 </EditItemTemplate>
27 <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
28 <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
29 <EmptyDataTemplate>
30 keine Daten vorhanden
31 <br />
32 <asp:LinkButton ID="NewButton" runat="server" CommandName="New" Text="Neuer Eintrag"></asp:LinkButton>
33 </EmptyDataTemplate>
34 <InsertItemTemplate>
35 Datum:
36 <asp:TextBox ID="DatumTextBox" runat="server" Text='<%# Bind("Datum", "{0:d}") %>'>
37 </asp:TextBox>
38 <br />
39 Fahrer:
40 <asp:TextBox ID="FahrerTextBox" runat="server" Text='<%# Bind("Fahrer") %>'>
41 </asp:TextBox>
42 <br />
43 polKennz:
44 <asp:TextBox ID="polKennzTextBox" runat="server" Text='<%# Bind("polKennz") %>'>
45 </asp:TextBox>
46 <br />
47 neuer_Eintrag:
48 <asp:TextBox ID="neuer_EintragTextBox" runat="server" Text='<%# Bind("neu") %>'></asp:TextBox>
49 <br />
50 aktuell:
51 <asp:TextBox ID="aktuellTextBox" runat="server" Text='<%# Bind("aktuell") %>'></asp:TextBox> <br />
52 <br />
53 <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
54 Text="Einfügen" OnClick="InsertButton_Click">
55 </asp:LinkButton>
56 <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
57 Text="Abbrechen">
58 </asp:LinkButton>
59 </InsertItemTemplate>
60 <ItemTemplate>
61 Datum:
62 <asp:Label ID="DatumLabel" runat="server" Text='<%# Bind("Datum") %>'></asp:Label><br />
63 Fahrer:
64 <asp:Label ID="FahrerLabel" runat="server" Text='<%# Bind("Fahrer") %>'></asp:Label><br />
65 polKennz:
66 <asp:Label ID="polKennzLabel" runat="server" Text='<%# Bind("polKennz") %>'></asp:Label><br />
67 neu:
68 <asp:Label ID="neuLabel" runat="server" Text='<%# Bind("neu") %>'></asp:Label><br />
69 lfdNr:
70 <asp:Label ID="lfdNrLabel" runat="server" Text='<%# Eval("lfdNr") %>'></asp:Label><br />
71 aktuell:
72 <asp:Label ID="aktuellLabel" runat="server" Text='<%# Bind("aktuell") %>'></asp:Label><br />
73 Dienststelle:
74 <asp:Label ID="DienststelleLabel" runat="server" Text='<%# Bind("Dienststelle") %>'></asp:Label><br />
75 <asp:LinkButton ID="NewButton" runat="server" CommandName="New" Text="Neuer Eintrag"></asp:LinkButton>
76 </ItemTemplate>
77 <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
78 </asp:FormView>
79 </td>
80 <td style="height: 235px">
81 </td>
82 </tr>
83 <tr>
84 <td>
85 </td>
86 <td>
87 </td>
88 <td>
89 </td>
90 </tr>
91 </table>
92<asp:AccessDataSource ID="AccessDataSource2" runat="server" DataFile="~/App_Data/KfzDaten_Ansicht.mdb"
93 SelectCommand="SELECT DISTINCT [polKennz] FROM [qry_KennzeichenAlle_ohne_ausgesondert]">
94 </asp:AccessDataSource>
95 <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/KfzDaten_Ansicht.mdb"
96 SelectCommand="SELECT DISTINCT [Datum], [Nutzer], [Fahrer], [polKennz], [aktuell], [neu], [gefahren] FROM [qry_Fahrtenbuch_letzter_Eintrag_pro_Kfz] WHERE ([polKennz] = ?)">
97 <SelectParameters>
98 <asp:ControlParameter ControlID="DropDownList1" Name="polKennz" PropertyName="SelectedValue"
99 Type="String" />
100 </SelectParameters>
101 </asp:AccessDataSource>
102 <asp:SqlDataSource ID="SqlDataSource1" DataSourceMode="DataSet" ConflictDetection="CompareAllValues" InsertCommandType="Text" runat="server" ConnectionString="<%$ ConnectionStrings:KfzDaten_Ansicht_mdbConnectionString %>" ProviderName="<%$ ConnectionStrings:KfzDaten_Ansicht_mdbConnectionString.ProviderName %>"
103 InsertCommand="INSERT INTO Tab_import_Fahrtenbuch([Datum], [Fahrer], [polKennz], [neu], [aktuell]) VALUES (@.Datum, @.Fahrer, @.polKennz, @.Eingabe_neu, @.Eingabe_aktuell )" >
104 <SelectParameters>
105 <asp:ControlParameter ControlID="dropdownlist1" Name="newparameter" PropertyName="SelectedValue" />
106 </SelectParameters>
107 <InsertParameters>
108 <asp:FormParameter FormField="DatumTextBox" Name="Datum" Type="string" />
109 <asp:FormParameter FormField="FahrerTextBox" Name="Fahrer" Type="string" />
110 <asp:FormParameter FormField="polKennzTextBox" Name="polKennz" Type="string" />
111 <asp:FormParameter FormField="neuer_EintragTextBox" Name="neu" Type="Int32" ConvertEmptyStringToNull="false" />
112 <asp:FormParameter FormField="aktuellTextBox" Name="aktuell" Type="Int32" ConvertEmptyStringToNull="false" Direction="Input" />
113 </InsertParameters>
114 </asp:SqlDataSource>
115
116</asp:Content>
117
118

try to remove your cache,
<meta http-equiv="Cache-Control" content="no-cache"/>

here is the way to of ispost back

If Page.IsPostBack Then
/// place business logic

else


End If

|||

Hi folks

I did it with Response.Redirect("km_Eingabe.aspx")

It works well that way.

1Protected Sub SqlDataSource1_Inserted(ByVal senderAs Object,ByVal eAs System.Web.UI.WebControls.SqlDataSourceStatusEventArgs)Handles SqlDataSource1.Inserted2 Response.Redirect("km_Eingabe.aspx")34End Sub
 
Thekm_Eingabe.aspx.vb (code behind file)in not more then this and works.
Either way I'll try the  other solutions (cache and postback) too.
What did you think is the best way to do?
Many Thanks
Rosi
 

sql

Monday, March 12, 2012

Frm-40654

I have a form where I handle inserts in the on-insert
trigger. whenever I save a record and try to change a field afterwards, it gives the following error. It
wouldn't let me make any changes.

FRM-40654 record has been updated by another user. Re-query to see
change.

It seems to me that the trigger cannot commit the changes I make. I try
to write commit_form but it didn't like it. Any suggestions to fix this.

ThanksWhat it looks like your trying to do is insert into another table at the
same time as your form is writing to another table. Typically, for
this type of action, a "pre" or "post" trigger is used (preferable in this
case, a "post-insert" trigger.

The "pre" is typically used to obtain other column values that you
previously havent'y collected yet in the table your block will be
writing to, such as the "key value" from a sequence.

If you use a "post-insert" trigger, you may also want to post your
results before you perform your insert. Then, if the post is successful,
insert your results to the other table.

frequent timeouts on SQL Server 2000

I have been receiving timeout errors frequently form our database. Any
suggestions as to the cause?
Thanks.
Usarian
Hi,
Can you try optimizing your SQL's and Stored procedures. Use the Profiler
with CPU / Duration in the display.
Identify the procedures/SQL's taking more duration/CPU. After that using
tune the code using Execution Plans / Index tuning wizard...
Thanks
Hari
SQL Server MVP
"Usarian Skiff" <usarian.skiff@.servicecentermetals.com> wrote in message
news:%23b8rWl%23hFHA.1248@.TK2MSFTNGP12.phx.gbl...
>I have been receiving timeout errors frequently form our database. Any
> suggestions as to the cause?
> Thanks.
> Usarian
>
|||Blocking.
Run sp_who2 or profiler to see what extent blocking is affecting your
concurrency.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Usarian Skiff" <usarian.skiff@.servicecentermetals.com> wrote in message
news:%23b8rWl%23hFHA.1248@.TK2MSFTNGP12.phx.gbl...
>I have been receiving timeout errors frequently form our database. Any
> suggestions as to the cause?
> Thanks.
> Usarian
>

frequent timeouts on SQL Server 2000

I have been receiving timeout errors frequently form our database. Any
suggestions as to the cause?
Thanks.
UsarianHi,
Can you try optimizing your SQL's and Stored procedures. Use the Profiler
with CPU / Duration in the display.
Identify the procedures/SQL's taking more duration/CPU. After that using
tune the code using Execution Plans / Index tuning wizard...
Thanks
Hari
SQL Server MVP
"Usarian Skiff" <usarian.skiff@.servicecentermetals.com> wrote in message
news:%23b8rWl%23hFHA.1248@.TK2MSFTNGP12.phx.gbl...
>I have been receiving timeout errors frequently form our database. Any
> suggestions as to the cause?
> Thanks.
> Usarian
>|||Blocking.
Run sp_who2 or profiler to see what extent blocking is affecting your
concurrency.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Usarian Skiff" <usarian.skiff@.servicecentermetals.com> wrote in message
news:%23b8rWl%23hFHA.1248@.TK2MSFTNGP12.phx.gbl...
>I have been receiving timeout errors frequently form our database. Any
> suggestions as to the cause?
> Thanks.
> Usarian
>

frequent timeouts on SQL Server 2000

I have been receiving timeout errors frequently form our database. Any
suggestions as to the cause?
Thanks.
UsarianHi,
Can you try optimizing your SQL's and Stored procedures. Use the Profiler
with CPU / Duration in the display.
Identify the procedures/SQL's taking more duration/CPU. After that using
tune the code using Execution Plans / Index tuning wizard...
Thanks
Hari
SQL Server MVP
"Usarian Skiff" <usarian.skiff@.servicecentermetals.com> wrote in message
news:%23b8rWl%23hFHA.1248@.TK2MSFTNGP12.phx.gbl...
>I have been receiving timeout errors frequently form our database. Any
> suggestions as to the cause?
> Thanks.
> Usarian
>|||Blocking.
Run sp_who2 or profiler to see what extent blocking is affecting your
concurrency.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Usarian Skiff" <usarian.skiff@.servicecentermetals.com> wrote in message
news:%23b8rWl%23hFHA.1248@.TK2MSFTNGP12.phx.gbl...
>I have been receiving timeout errors frequently form our database. Any
> suggestions as to the cause?
> Thanks.
> Usarian
>

Friday, February 24, 2012

Free Form Typing

I have a report where I need to be able to free type in information? I would need it to pull the data that I have added to the report as well as give me blank spaces to free form?
does this make sense?Have you tried using Parameter fields?