Friday, March 23, 2012
Frontpage & MS SQL Connection Error-Please Help
are NOT in a domain. The second server has SQL 2000, the first has IIS 6.0
Through OBDC (System DSN) I created a connection to the SQL db. Then on
my laptop I opened up frontpage to create a page to view the db results.
But, I get the this error when I select the "System Data Source on Web
Server":
"Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection"
I have been browsing through the web for some time now and can not seem
to get a direct resolution to this error.
On the SQL Server Management under Logins I have selected "Windows
Authentication", I have added the IIS_WPG, created a new account named
SQLUSER, etc..
Nothing seems to work. Every solution I have found so far on the web has
to do with another application, most often it seems it is a .net issue.
Basically I am trying to create forms via Frontpage to input and view
data entered into a SQL db.
Any help will be very much appriciated
> "Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection"
Should give you a clue. One server does not trust the other BECAUSE THEY ARE
NOT IN A DOMAIN.
There is no way for the SQL server to know anything about the IIS server, it
could be anything trying to hack into the SQL Server.
I don't know how to get IIS to log into SQL using SQL authentication either
but perhaps you could post that question to an IIS newsgroup.
The other option is to add them both to a domain and set up an account on
SQL that refers to the IIS account and this time they will be authenticated
via the Domain Controller.
Nik Marshall-Blank MCSD/MCDBA
"Sam White" <noSPAM@.Please.com> wrote in message
news:wuCdnbqhoqA4k6beRVn-3g@.giganews.com...
> Hi, I have 2 servers, both with Windows 2003 Standard edition. Servers are
> NOT in a domain. The second server has SQL 2000, the first has IIS 6.0
> Through OBDC (System DSN) I created a connection to the SQL db. Then on my
> laptop I opened up frontpage to create a page to view the db results. But,
> I get the this error when I select the "System Data Source on Web Server":
> "Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection"
> I have been browsing through the web for some time now and can not seem to
> get a direct resolution to this error.
> On the SQL Server Management under Logins I have selected "Windows
> Authentication", I have added the IIS_WPG, created a new account named
> SQLUSER, etc..
> Nothing seems to work. Every solution I have found so far on the web has
> to do with another application, most often it seems it is a .net issue.
> Basically I am trying to create forms via Frontpage to input and view data
> entered into a SQL db.
> Any help will be very much appriciated
Frontpage & MS SQL Connection Error-Please Help
are NOT in a domain. The second server has SQL 2000, the first has IIS 6.0
Through OBDC (System DSN) I created a connection to the SQL db. Then on
my laptop I opened up frontpage to create a page to view the db results.
But, I get the this error when I select the "System Data Source on Web
Server":
"Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection"
I have been browsing through the web for some time now and can not seem
to get a direct resolution to this error.
On the SQL Server Management under Logins I have selected "Windows
Authentication", I have added the IIS_WPG, created a new account named
SQLUSER, etc..
Nothing seems to work. Every solution I have found so far on the web has
to do with another application, most often it seems it is a .net issue.
Basically I am trying to create forms via Frontpage to input and view
data entered into a SQL db.
Any help will be very much appriciated
This error means that the account is unknown on the SQL Server machine.
For example, suppose I create a user named User1 on computer Machine1.
Then I try to log into SQL Server on Machine2 using User1 from Machine1.
This is not possible because Machine2 has no idea about User1.
However, there is one trick you can employ to make this work, an old NTLM
trick that is used here.
If you create same user name on 2 machines with same exact password, then it
is possible for these accounts to work in this fashion (User1 from Machine1
to log into Machine2 as User1).
So in your case you need to create SQLUser on both machines with exact same
password and in theory it should work.
Matt Neerincx [MSFT]
This posting is provided "AS IS", with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
"Sam White" <noSPAM@.Please.com> wrote in message
news:wuCdnbmhoqAck6beRVn-3g@.giganews.com...
> Hi, I have 2 servers, both with Windows 2003 Standard edition. Servers are
> NOT in a domain. The second server has SQL 2000, the first has IIS 6.0
> Through OBDC (System DSN) I created a connection to the SQL db. Then on my
> laptop I opened up frontpage to create a page to view the db results. But,
> I get the this error when I select the "System Data Source on Web Server":
> "Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection"
> I have been browsing through the web for some time now and can not seem to
> get a direct resolution to this error.
> On the SQL Server Management under Logins I have selected "Windows
> Authentication", I have added the IIS_WPG, created a new account named
> SQLUSER, etc..
> Nothing seems to work. Every solution I have found so far on the web has
> to do with another application, most often it seems it is a .net issue.
> Basically I am trying to create forms via Frontpage to input and view data
> entered into a SQL db.
> Any help will be very much appriciated
Frontpage & MS SQL Connection Error-Please Help
are NOT in a domain. The second server has SQL 2000, the first has IIS 6.0
Through OBDC (System DSN) I created a connection to the SQL db. Then on
my laptop I opened up frontpage to create a page to view the db results.
But, I get the this error when I select the "System Data Source on Web
Server":
"Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection"
I have been browsing through the web for some time now and can not seem
to get a direct resolution to this error.
On the SQL Server Management under Logins I have selected "Windows
Authentication", I have added the IIS_WPG, created a new account named
SQLUSER, etc..
Nothing seems to work. Every solution I have found so far on the web has
to do with another application, most often it seems it is a .net issue.
Basically I am trying to create forms via Frontpage to input and view
data entered into a SQL db.
Any help will be very much appriciated> "Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection"
Should give you a clue. One server does not trust the other BECAUSE THEY ARE
NOT IN A DOMAIN.
There is no way for the SQL server to know anything about the IIS server, it
could be anything trying to hack into the SQL Server.
I don't know how to get IIS to log into SQL using SQL authentication either
but perhaps you could post that question to an IIS newsgroup.
The other option is to add them both to a domain and set up an account on
SQL that refers to the IIS account and this time they will be authenticated
via the Domain Controller.
Nik Marshall-Blank MCSD/MCDBA
"Sam White" <noSPAM@.Please.com> wrote in message
news:wuCdnbqhoqA4k6beRVn-3g@.giganews.com...
> Hi, I have 2 servers, both with Windows 2003 Standard edition. Servers are
> NOT in a domain. The second server has SQL 2000, the first has IIS 6.0
> Through OBDC (System DSN) I created a connection to the SQL db. Then on my
> laptop I opened up frontpage to create a page to view the db results. But,
> I get the this error when I select the "System Data Source on Web Server":
> "Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection"
> I have been browsing through the web for some time now and can not seem to
> get a direct resolution to this error.
> On the SQL Server Management under Logins I have selected "Windows
> Authentication", I have added the IIS_WPG, created a new account named
> SQLUSER, etc..
> Nothing seems to work. Every solution I have found so far on the web has
> to do with another application, most often it seems it is a .net issue.
> Basically I am trying to create forms via Frontpage to input and view data
> entered into a SQL db.
> Any help will be very much appriciated
Frontpage & MS SQL Connection Error-Please Help
are NOT in a domain. The second server has SQL 2000, the first has IIS 6.0
Through OBDC (System DSN) I created a connection to the SQL db. Then on
my laptop I opened up frontpage to create a page to view the db results.
But, I get the this error when I select the "System Data Source on Web
Server":
"Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection"
I have been browsing through the web for some time now and can not seem
to get a direct resolution to this error.
On the SQL Server Management under Logins I have selected "Windows
Authentication", I have added the IIS_WPG, created a new account named
SQLUSER, etc..
Nothing seems to work. Every solution I have found so far on the web has
to do with another application, most often it seems it is a .net issue.
Basically I am trying to create forms via Frontpage to input and view
data entered into a SQL db.
Any help will be very much appriciated> "Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection"
Should give you a clue. One server does not trust the other BECAUSE THEY ARE
NOT IN A DOMAIN.
There is no way for the SQL server to know anything about the IIS server, it
could be anything trying to hack into the SQL Server.
I don't know how to get IIS to log into SQL using SQL authentication either
but perhaps you could post that question to an IIS newsgroup.
The other option is to add them both to a domain and set up an account on
SQL that refers to the IIS account and this time they will be authenticated
via the Domain Controller.
--
Nik Marshall-Blank MCSD/MCDBA
"Sam White" <noSPAM@.Please.com> wrote in message
news:wuCdnbqhoqA4k6beRVn-3g@.giganews.com...
> Hi, I have 2 servers, both with Windows 2003 Standard edition. Servers are
> NOT in a domain. The second server has SQL 2000, the first has IIS 6.0
> Through OBDC (System DSN) I created a connection to the SQL db. Then on my
> laptop I opened up frontpage to create a page to view the db results. But,
> I get the this error when I select the "System Data Source on Web Server":
> "Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection"
> I have been browsing through the web for some time now and can not seem to
> get a direct resolution to this error.
> On the SQL Server Management under Logins I have selected "Windows
> Authentication", I have added the IIS_WPG, created a new account named
> SQLUSER, etc..
> Nothing seems to work. Every solution I have found so far on the web has
> to do with another application, most often it seems it is a .net issue.
> Basically I am trying to create forms via Frontpage to input and view data
> entered into a SQL db.
> Any help will be very much appriciated
Frontpage & MS SQL Connection Error-Please Help
are NOT in a domain. The second server has SQL 2000, the first has IIS 6.0
Through OBDC (System DSN) I created a connection to the SQL db. Then on
my laptop I opened up frontpage to create a page to view the db results.
But, I get the this error when I select the "System Data Source on Web
Server":
"Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection"
I have been browsing through the web for some time now and can not seem
to get a direct resolution to this error.
On the SQL Server Management under Logins I have selected "Windows
Authentication", I have added the IIS_WPG, created a new account named
SQLUSER, etc..
Nothing seems to work. Every solution I have found so far on the web has
to do with another application, most often it seems it is a .net issue.
Basically I am trying to create forms via Frontpage to input and view
data entered into a SQL db.
Any help will be very much appriciated
If you are not on a domain your best bet is probably to use SQL
Authentication. You will pass a user name and password from the web page to
SQL Server.
Keith
"Sam White" <noSPAM@.Please.com> wrote in message
news:wuCdnbihoqAZk6beRVn-3g@.giganews.com...
> Hi, I have 2 servers, both with Windows 2003 Standard edition. Servers are
> NOT in a domain. The second server has SQL 2000, the first has IIS 6.0
> Through OBDC (System DSN) I created a connection to the SQL db. Then on my
> laptop I opened up frontpage to create a page to view the db results. But,
> I get the this error when I select the "System Data Source on Web Server":
> "Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection"
> I have been browsing through the web for some time now and can not seem to
> get a direct resolution to this error.
> On the SQL Server Management under Logins I have selected "Windows
> Authentication", I have added the IIS_WPG, created a new account named
> SQLUSER, etc..
> Nothing seems to work. Every solution I have found so far on the web has
> to do with another application, most often it seems it is a .net issue.
> Basically I am trying to create forms via Frontpage to input and view data
> entered into a SQL db.
> Any help will be very much appriciated
|||I meant to mention in my previous post that you can look up connection
string examples on www.connectionstrings.com
Keith
"Sam White" <noSPAM@.Please.com> wrote in message
news:wuCdnbihoqAZk6beRVn-3g@.giganews.com...
> Hi, I have 2 servers, both with Windows 2003 Standard edition. Servers are
> NOT in a domain. The second server has SQL 2000, the first has IIS 6.0
> Through OBDC (System DSN) I created a connection to the SQL db. Then on my
> laptop I opened up frontpage to create a page to view the db results. But,
> I get the this error when I select the "System Data Source on Web Server":
> "Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection"
> I have been browsing through the web for some time now and can not seem to
> get a direct resolution to this error.
> On the SQL Server Management under Logins I have selected "Windows
> Authentication", I have added the IIS_WPG, created a new account named
> SQLUSER, etc..
> Nothing seems to work. Every solution I have found so far on the web has
> to do with another application, most often it seems it is a .net issue.
> Basically I am trying to create forms via Frontpage to input and view data
> entered into a SQL db.
> Any help will be very much appriciated
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>117118Hi 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 SubThekm_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