Unable To Update The Data
Feb 3, 2006
Hi,
I am not able to modify(add rows into) a table present in sql server from my vb.net application. I am using sql server 2005 enterprise edition and vs.net 2003. are they compatible?
thanks for your help..
View 5 Replies
ADVERTISEMENT
May 11, 2007
I'm using a formview to display, insert and update records and it appears to be working fine except when I try to update anything. It takes the update and goes back to diaply mode but the changes aren't reflected in the data for some reason. It's like I didn't change anything at all.
Here's the SQL statement and parameters (I put elipses in to shorten it of course):...
<body>
<% 'Response.Write(Request.UserHostName)%>
<form id="form1" runat="server">
<div align=center>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:BGHelpdeskConnectionString %>"
OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT RequestID, ReqDate, ReqGSN, ReqName ... FROM tblRequests ORDER BY RequestID DESC" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [tblRequests] WHERE [RequestID] = @original_RequestID AND [ReqDate] = @original_ReqDate AND [ReqGSN] = @original_ReqGSN AND ... [Other] = @original_Other AND [Comments] = @original_Comments" InsertCommand="INSERT INTO [tblRequests] ([ReqDate], [ReqGSN], [ReqName], ... [Other], [Comments]) VALUES (@ReqDate, @ReqGSN, @ReqName, ... @Other, @Comments)" UpdateCommand="UPDATE [tblRequests] SET [ReqDate] = @ReqDate, [ReqGSN] = @ReqGSN, [ReqName] = @ReqName, ... [Other] = @Other, [Comments] = @Comments WHERE [RequestID] = @original_RequestID AND [ReqDate] = @original_ReqDate AND ... [Other] = @original_Other AND [Comments] = @original_Comments">
<DeleteParameters>
<asp:Parameter Name="original_RequestID" Type="Int32" />
<asp:Parameter Name="original_ReqDate" Type="DateTime" />
<asp:Parameter Name="original_ReqGSN" Type="String" />
...
<asp:Parameter Name="original_Other" Type="String" />
<asp:Parameter Name="original_Comments" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ReqDate" Type="DateTime" />
<asp:Parameter Name="ReqGSN" Type="String" />
<asp:Parameter Name="ReqName" Type="String" />
...
<asp:Parameter Name="Other" Type="String" />
<asp:Parameter Name="Comments" Type="String" />
<asp:Parameter Name="original_RequestID" Type="Int32" />
<asp:Parameter Name="original_ReqDate" Type="DateTime" />
<asp:Parameter Name="original_ReqGSN" Type="String" />
<asp:Parameter Name="original_ReqName" Type="String" />
...
<asp:Parameter Name="original_Other" Type="String" />
<asp:Parameter Name="original_Comments" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ReqDate" Type="DateTime" />
<asp:Parameter Name="ReqGSN" Type="String" />
<asp:Parameter Name="ReqName" Type="String" />
<asp:Parameter Name="ReqPhone" Type="String" />
... etc
And here's my formview:1 <asp:FormView ID="FormView1" runat="server" DataKeyNames="RequestID"
2 DataSourceID="SqlDataSource1" Width="800px" BackColor="Transparent" BorderStyle="None" OnItemInserting="FormView1_ItemInserting">
3 <EditItemTemplate>
4 <table id="Table4" cellpadding="10" cellspacing="5" class="Layout" language="javascript"
5 onclick="return TABLE1_onclick()" width="800">
6 <tr>
7 <td bgcolor="#93bde7" colspan="3" style="height: 20px; text-align: right">
8 <asp:ImageButton ID="ImageButton1" runat="server" CommandName="Update" ImageUrl="~/img/btn/check.gif"
9 ToolTip="Submit Form" />
10 <asp:ImageButton ID="ImageButton2" runat="server" CausesValidation="False"
11 CommandName="Cancel" ImageUrl="~/img/btn/x.gif" ToolTip="Cancel Request" /></td>
12 </tr>
13 <tr style="color: #000000">
14 <td rowspan="2" style="width: 400px; text-align: right" valign="top">
15 </td>
16 <td rowspan="2" style="width: 135px" valign="top">
17 Request Type:
18 <br />
19 <asp:RadioButtonList ID="RadioButtonList1" runat="server" SelectedValue='<%# Bind("ReqType", "{0}") %>'>
20 <asp:ListItem>Starter</asp:ListItem>
21 <asp:ListItem>Leaver</asp:ListItem>
22 <asp:ListItem>Mover</asp:ListItem>
23 <asp:ListItem>Ad Hoc</asp:ListItem>
24 </asp:RadioButtonList>
25 </td>
26 <td rowspan="2" style="text-align: right">
27 <img height="77" src="../img/CSBGLogoMed.jpg" width="226" /></td>
28 </tr>
29 <tr>
30 </tr>
31 </table>
32 <br />
33 <table id="Table5" cellpadding="10" cellspacing="5" class="Layout" language="javascript"
34 onclick="return TABLE1_onclick()" width="800">
35 <tr>
36 <td bgcolor="#93bde7" colspan="3" style="height: 20px">
37 </td>
38 </tr>
39 <tr>
40 <td rowspan="2" style="text-align: right; width: 264px;">
41 <asp:Label ID="Label6" runat="server" Text="Legal First Name:"></asp:Label>
42 <asp:TextBox ID="FirstNameTextBox" runat="server" Text='<%# Bind("FirstName") %>' Width="120px"></asp:TextBox>
43 <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="FirstNameTextBox">*</asp:RequiredFieldValidator><br />
44 <asp:Label ID="Label8" runat="server" Text="Known As:"></asp:Label>
45 <asp:TextBox ID="KnownAsTextBox" runat="server" Text='<%# Bind("KnownAs") %>' Width="120px"></asp:TextBox>
46 <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="KnownAsTextBox">*</asp:RequiredFieldValidator>
47 <br />
48 <asp:Label ID="Label10" runat="server" Text="Middle Name"></asp:Label>
49 <asp:TextBox ID="MiddleNameTextBox" runat="server" Text='<%# Bind("MiddleName") %>' Width="120px"></asp:TextBox>
50 <br />
51 <asp:Label ID="Label12" runat="server" Text="Last Name:"></asp:Label>
52 <asp:TextBox ID="LastNameTextBox" runat="server" Text='<%# Bind("LastName") %>' Width="120px"></asp:TextBox>
53 <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="LastNameTextBox">*</asp:RequiredFieldValidator>
54 <br />
55 <br />
56 <asp:Label ID="Label14" runat="server" Text="Global Short Name:"></asp:Label>
57 <asp:TextBox ID="GlobalShortNameTextBox" runat="server" Text='<%# Bind("GlobalShortName") %>' Width="120px"></asp:TextBox> <br />
58 <br />
59 <asp:Label ID="Label16" runat="server" Text="Employment Type:"></asp:Label>
60 <asp:DropDownList ID="DropDown1" runat="server" SelectedValue='<%# Bind("EmpType") %>' Width=120>
61 <asp:ListItem Value="Employee ">Employee </asp:ListItem>
62 <asp:ListItem Value="Contractor">Contractor</asp:ListItem>
63 </asp:DropDownList><br />
64 <br />
65 <asp:Label ID="Label18" runat="server" Text="Contract Type:"></asp:Label>
66 <asp:TextBox ID="ContractTypeTextBox" runat="server" Text='<%# Bind("ContractType") %>' Width="120px"></asp:TextBox>
67 <br />
68 <asp:Label ID="Label20" runat="server" Text="Agency:"></asp:Label>
69 <asp:TextBox ID="AgencyTextBox" runat="server" Text='<%# Bind("Agency") %>' Width="120px"></asp:TextBox>
70 <br />
71 <br />
72 <asp:Label ID="Label22" runat="server" Text="Hire Date:"></asp:Label>
73 <asp:TextBox ID="StartDateTextBox" runat="server" Text='<%# Bind("StartDate") %>' Width="120px"></asp:TextBox>
74 <br />
75 EndDate:<asp:TextBox ID="EndDateTextBox" runat="server" Text='<%# Bind("EndDate") %>' Width="120px"></asp:TextBox>
76 </td>
77 <td rowspan="2" style="text-align: right; width: 222px;">
78 Existing Position
79 <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("ExistingPosition") %>' Width="120px" /><br />
80 Job Title:
81 <asp:TextBox ID="JobTitleTextBox" runat="server" Text='<%# Bind("JobTitle") %>' Width="120px"></asp:TextBox><br />
82 Department:
83 <asp:TextBox ID="DepartmentTextBox" runat="server" Text='<%# Bind("Department") %>' Width="120px"></asp:TextBox><br />
84 Site Location:
85 <asp:TextBox ID="SiteLocationTextBox" runat="server" Text='<%# Bind("SiteLocation") %>' Width="120px"></asp:TextBox><br />
86 <br />
87 Company Code:
88 <asp:TextBox ID="CompanyCodeTextBox" runat="server" Text='<%# Bind("CompanyCode") %>' Width="120px"></asp:TextBox><br />
89 Cost Center:
90 <asp:TextBox ID="CostCenterTextBox" runat="server" Text='<%# Bind("CostCenter") %>' Width="120px"></asp:TextBox><br />
91 <br />
92 Function Code:<br />
93 <asp:DropDownList ID="DropDown3" runat="server" SelectedValue='<%# Bind("FunctionCode") %>'>
94 <asp:ListItem Selected="True">Select one...</asp:ListItem>
95 <asp:ListItem>Commercial - Brand/Consumer Marketing</asp:ListItem>
96 <asp:ListItem>Commercial - Trade/Customer Marketing</asp:ListItem>
97 <asp:ListItem>Commercial - Marketing - Misc</asp:ListItem>
98 <asp:ListItem>Commercial - Sales - Account Mgmt</asp:ListItem>
99 <asp:ListItem>Commercial - Sales - Field Sales</asp:ListItem>
100 <asp:ListItem>Commerical - Sales - Misc</asp:ListItem>
101 <asp:ListItem>Commercial - Innovation/Activity Mgmt</asp:ListItem>
102 <asp:ListItem>Commercial - Licensing</asp:ListItem>
103 <asp:ListItem>Commerical - Franchise & Export</asp:ListItem>
104 <asp:ListItem>Commercial - Consumer Insight & Resch</asp:ListItem>
105 <asp:ListItem>Supply Chain - General</asp:ListItem>
106 <asp:ListItem>Supply Chain - QEHS (formerly Compliance)</asp:ListItem>
107 <asp:ListItem>Supply Chain - Manufacturing Indirect</asp:ListItem>
108 <asp:ListItem>Supply Chain - Distribution Indirect</asp:ListItem>
109 <asp:ListItem>Supply Chain - Procurement</asp:ListItem>
110 <asp:ListItem>Supply Chain - Manufacturing Direct</asp:ListItem>
111 <asp:ListItem>Supply Chain - Distribution Direct</asp:ListItem>
112 <asp:ListItem>Finance - Strategy</asp:ListItem>
113 <asp:ListItem>Finance - Finance</asp:ListItem>
114 <asp:ListItem>Finance - Business Process Support</asp:ListItem>
115 <asp:ListItem>Finance - Information Technology/RICS</asp:ListItem>
116 <asp:ListItem>Finance - SBS - General</asp:ListItem>
117 <asp:ListItem>Finance - SBS - HR</asp:ListItem>
118 <asp:ListItem>Finance - SBS - Finance</asp:ListItem>
119 <asp:ListItem>Finance - SBS - Customer to Cash</asp:ListItem>
120 <asp:ListItem>Finance - SBS - Corporate Services</asp:ListItem>
121 <asp:ListItem>Human Resources - Human Resources</asp:ListItem>
122 <asp:ListItem>Human Resources - Communications</asp:ListItem>
123 <asp:ListItem>Human Resources - External Affairs</asp:ListItem>
124 <asp:ListItem>Legal</asp:ListItem>
125 <asp:ListItem>Chief Executive's Committee</asp:ListItem>
126 <asp:ListItem>General Management</asp:ListItem>
127 <asp:ListItem>Science & Technology</asp:ListItem>
128 </asp:DropDownList>
129 </td>
130 <td rowspan="2" style="text-align: right">
131 <asp:Panel ID="Panel2" runat="server" Width="100%">
132 Manager:</asp:Panel>
133 <br />
134 <asp:Panel ID="Panel1" runat="server" DefaultButton="MgrNameButton" Width="100%">
135 <asp:TextBox ID="MgrNameTextBox" runat="server" Text='<%# Bind("MgrName") %>' Width="104px"></asp:TextBox>
136 <asp:Button ID="MgrNameButton" runat="server" Text="Check Name" OnClick="ValidateManager" CausesValidation="False" Font-Size="8pt" Width="72px" />
137 <asp:Label ID="MgrNameLabel" runat="server" Text="Label" Visible="False" Width="184px" Font-Size="8pt"></asp:Label></asp:Panel>
138 <br />
139 Phone:
140 <asp:TextBox ID="MgrPhoneTextBox" runat="server" Text='<%# Bind("MgrPhone") %>' Width="120px"></asp:TextBox><br />
141 Email:
142 <asp:TextBox ID="MgrEmailTextBox" runat="server" Text='<%# Bind("MgrEmail") %>' Width="120px"></asp:TextBox><br />
143 <br />
144 Alternate Manager Information:
145 <br />
146 Name:
147 <asp:TextBox ID="AltMgrNameTextBox" runat="server" Text='<%# Bind("AltMgrName") %>' Width="120px"></asp:TextBox><br />
148 Phone:
149 <asp:TextBox ID="AltMgrPhoneTextBox" runat="server" Text='<%# Bind("AltMgrPhone") %>' Width="120px"></asp:TextBox><br />
150 Email:
151 <asp:TextBox ID="AltMgrEmailTextBox" runat="server" Text='<%# Bind("AltMgrEmail") %>' Width="120px"></asp:TextBox><br />
152 <br />
153 HRAdmin:
154 <asp:TextBox ID="HRAdminTextBox" runat="server" Text='<%# Bind("HRAdmin") %>' Width="120px"></asp:TextBox></td>
155 </tr>
156 <tr>
157 </tr>
158 </table>
159 <br />
160 <table id="Table6" cellpadding="10" cellspacing="5" class="Layout" language="javascript"
161 onclick="return TABLE1_onclick()" width="800">
162 <tr>
163 <td bgcolor="#93bde7" colspan="2" style="height: 20px">
164 </td>
165 </tr>
166 <tr>
167 <td rowspan="2" style="width: 246px; text-align: right" valign="top">
168 ComputerType:
169 <asp:DropDownList ID="DropDownList2" runat="server" SelectedValue='<%# Bind("ComputerType") %>' Width=120>
170 <asp:ListItem Selected="True">Use Existing Computer</asp:ListItem>
171 <asp:ListItem>New Desktop Required</asp:ListItem>
172 <asp:ListItem>New Laptop Required</asp:ListItem>
173 </asp:DropDownList><br /> Laptop Bag:
174 <asp:CheckBox ID="CheckBox2" runat="server" Checked='<%# Bind("LaptopBag") %>' Width="120px" /><br />
175 Laptop Dock:
176 <asp:CheckBox ID="CheckBox3" runat="server" Checked='<%# Bind("LaptopDock") %>' Width="120px" /><br />
177 Monitor:
178 <asp:CheckBox ID="CheckBox4" runat="server" Checked='<%# Bind("Monitor") %>' Width="120px" /><br />
179 Printer Type:
180 <asp:TextBox ID="PrinterTypeTextBox" runat="server" Text='<%# Bind("PrinterType") %>' Width="120px"></asp:TextBox><br />
181 Long Distance:
182 <asp:CheckBox ID="CheckBox5" runat="server" Checked='<%# Bind("LongDistance") %>' Width="120px" /><br />
183 SSN5:
184 <asp:TextBox ID="SSN5TextBox" runat="server" Text='<%# Bind("SSN5") %>' Width="120px"></asp:TextBox><br />
185 SAP Midwest:
186 <asp:CheckBox ID="CheckBox6" runat="server" Checked='<%# Bind("SAPMidwest") %>' Width="120px" /><br />
187 SAP Southwest:
188 <asp:CheckBox ID="CheckBox7" runat="server" Checked='<%# Bind("SAPSouthwest") %>' Width="120px" /><br />
189 SAP Mirror:
190 <asp:TextBox ID="SAPMirrorTextBox" runat="server" Text='<%# Bind("SAPMirror") %>' Width="120px"></asp:TextBox><br />
191 SAP Approve:
192 <asp:CheckBox ID="CheckBox8" runat="server" Checked='<%# Bind("SAPApprove") %>' Width="120px" /><br />
193 Margin Minder:
194 <asp:TextBox ID="MarginMinderTextBox" runat="server" Text='<%# Bind("MarginMinder") %>' Width="120px"></asp:TextBox><br />
195 Nextel Type:
196 <asp:TextBox ID="NextelTypeTextBox" runat="server" Text='<%# Bind("NextelType") %>' Width="120px"></asp:TextBox><br />
197 MyCS:
198 <asp:CheckBox ID="CheckBox9" runat="server" Checked='<%# Bind("MyCS") %>' Width="120px" /><br />
199 Notes DB:
200 <asp:TextBox ID="NotesDBTextBox" runat="server" Text='<%# Bind("NotesDB") %>' Width="120px"></asp:TextBox><br />
201 Outlook Email:
202 <asp:CheckBox ID="CheckBox10" runat="server" Checked='<%# Bind("OutlookEmail") %>' Width="120px" /><br />
203 Dept Share:
204 <asp:TextBox ID="DeptShareTextBox" runat="server" Text='<%# Bind("DeptShare") %>' Width="120px"></asp:TextBox><br />
205 Share Point:
206 <asp:CheckBox ID="CheckBox11" runat="server" Checked='<%# Bind("SharePoint") %>' Width="120px" /><br />
207 EPM:
208 <asp:CheckBox ID="CheckBox12" runat="server" Checked='<%# Bind("EPM") %>' Width="120px" /><br />
209 CliqBook:
210 <asp:CheckBox ID="CheckBox13" runat="server" Checked='<%# Bind("CliqBook") %>' Width="120px" /><br />
211 VPN:
212 <asp:CheckBox ID="CheckBox14" runat="server" Checked='<%# Bind("VPN") %>' Width="120px" /><br />
213 Other:
214 <asp:TextBox ID="OtherTextBox" runat="server" Text='<%# Bind("Other") %>' Width="120px"></asp:TextBox><br />
215 </td>
216 <td colspan="1" rowspan="2" style="text-align: right" valign="top">
217 Comments:
218 <br />
219 <asp:TextBox ID="CommentsTextBox" runat="server" Height="367px" Text='<%# Bind("Comments") %>'
220 Width="486px" TextMode="MultiLine" BorderStyle="Solid" BorderWidth="1px"></asp:TextBox><br />
221 <br />
222 </td>
223 </tr>
224 <tr>
225 </tr>
226 <tr>
227 <td background="../img/csbanner.jpg" bgcolor="#93bde7" colspan="2" rowspan="1" style="text-align: left">
228 <asp:ImageButton ID="ImageButton3" runat="server" CommandName="Update" ImageUrl="~/img/btn/check.gif"
229 ToolTip="Submit Form" /> <asp:ImageButton ID="ImageButton4" runat="server" CausesValidation="False"
230 CommandName="Cancel" ImageUrl="~/img/btn/x.gif" />
231 </td>
232 </tr>
233 </table>
234 <asp:ValidationSummary ID="ValidationSummary1" runat="server" BackColor="Yellow"
235 DisplayMode="SingleParagraph" Font-Bold="True" HeaderText="Please fill in the fields indicated with a red asterisk (*)"
236 Width="800px" />
237 </EditItemTemplate>
238 <InsertItemTemplate>
239 ...
240 </InsertItemTemplate>
241 <ItemTemplate>
242 ...
243 </ItemTemplate>
244 </asp:FormView>
View 7 Replies
View Related
Jan 18, 2008
In my web page(.Net/c#) , I want to update few fields of a database table. The code is fine. The stored procedure through which I perform the execution is fine. I'm confidently saying this is because, if I try to do the update direclty while executing the stored procedure, it gets updated. I'm facing a weird problem while trying to update the fields from my web page. When I make an update and submit it, the first time it shows the updated value in the screen. But if I try to refresh it or redisplay the data ( I guess whenever it makes a trip to the database), the old values gets populated instead of the new values. I tried debugging it, but everything seems to be working fine. I looked up the execution in SQL Profiler, everything seems to be fine. I've no clue what's going on. I've proper permissions to make an update. So there is no permission issue. Could someone tell me how to handle this issue and what might be the possible problem which makes the values not update in the database?
View 8 Replies
View Related
Jan 20, 2006
I have a Table which stores data from two different databases. To update it I made a Web Form that opens a single record where you can edit the data (using TextBox). Then there is an Update Button, which is supoused to Update that record in the SQL Database. However, for some reason it does not work. I get no error and every thing seems to work fine, but the data is not updated. When running the same UPDATE statment in the SQL Query Analyzer everything works just fine. Here is the code for the button click (For test purpose I've set a spesific record to update the Task cell to "Test" and I've adde a DataGrid to be able to see if something is happening):
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Dim objConnection As SqlConnection
Dim objDataAdapter As SqlDataAdapter
Dim objDataSet As DataSet
Dim objDataView As DataView
Dim strConnect As String
Dim strSQL As String
Dim strUpdate As String
strConnect = "Persist Security Info=False;Integrated Security=SSPI;server=SRV01;database=DB1"
strSQL = "SELECT * FROM Users WHERE UserID ='" & Request.QueryString("UserID") & "'"
strUpdate = "UPDATE Users SET Task = 'Test' WHERE UserID = 36" '" & Request.QueryString("UserID") & "'"
objConnection = New SqlConnection(strConnect)
objDataAdapter = New SqlDataAdapter(strSQL, objConnection)
objDataAdapter.UpdateCommand = New SqlCommand(strUpdate)
objDataSet = New DataSet
objDataAdapter.Fill(objDataSet, "User")
objDataView = New DataView(objDataSet.Tables("User"))
dgrTest.DataSource = objDataView
dgrTest.DataBind()
objDataAdapter.ContinueUpdateOnError = True
Try
objDataAdapter.Update(objDataSet, "User")
lblTest.Text = objDataAdapter.UpdateCommand.CommandText
Catch ex As Exception
lblTest.Text = "Error"
End Try
End Sub
Thank you for your much needed help in advance.
View 3 Replies
View Related
Dec 24, 2007
Hello,
I have a frustrating problem occuring in Sql 2005. We have the need
in a few client upgrade situations to update the indentity column of a common
resource table. It is populated each release with common records and the
keys got out of sync for two releases due to developer error.
In Oracle this is not a problem. In SQL we get the message "Cannot
update identity column 'mycolumn'". To get around this in SQL 2000 we
updated the table by running the following.
exec sp_configure 'allow update', 1
go
reconfigure with override
go
update syscolumns set colstat = colstat - 1
where id = object_id(Event')
and name = 'EventKey'
go
exec sp_configure 'allow update', 0
go
reconfigure with override
go
In SQL 2005 this gives us the error
'Ad hoc updates to system catalogs are not allowed'.
Now I understand the need to keep people out of the system tables.
However, can I have some sort of solution to this problem. I'm running a
bunch of ad hoc queries to update the values and I don't want to create an
exact duplicate of the table and copy over the information with the changes.
It is much easier to run a simple update.
Please advise...
Thanks,
Russ
View 4 Replies
View Related
Aug 1, 2007
Okay.
Be patient with me I am a relative newbie to all this.
Trying to develop a very simple package to update data in daily chunks from one server to another. Now my first step was to obtain the last date in my currenttable which I have a SQL task as my first operation. This brings back the last date for which I have data stored, all fine and dandy. I am then taking the single row result set, datetime data type, and feeding this to a variable.
My problem is my variable does not update, it just sits there and unusually for a variable, doesn't vary at all. Now we have an old hand with SSIS who tells me I'm doing nothing wrong and is equally puzzled. I have tried all datatype combinations and I'm getting nowhere fast.
Any help would be greatly appreciated.
The server is running:
Windows 2003 R2 SP1
SQL Server 2005 SP1
The server has also been configured as the DNS server.
Many Thanks
Geoff.
View 8 Replies
View Related
Apr 3, 2007
Hi theres,
I have installed SP2 on my server (Window server 2003 and SQl Server 2005 standard Edition both are 64 bit). But when i query SELECT @@VERSION. i got that latest installed SP is SP1.Even i have installed SP2 successfully and interactively then where m wrong(Window server have Sp2)
View 2 Replies
View Related
Jun 13, 2007
Hello,
I have been serching for weeks to resolve this problem. I am new to ASP.NET and trying to make the migration from ASP which I have programmed in for years. I am using Microsoft Visual Web Developer 2005 Express Edition and SQL Express Edtion. I have been working through the Microsoft Video Training at http://msdn.microsoft.com/vstudio/express/beginner/learningpath/ and created a web site using Tier 3 Lesson 8 as the model. My new web site which is a simple phone book applicaiton lets me read the table and select the record without any problem. But the update form lets me edit but when I attempt to Apply the update I get the following error.
Server Error in '/Phonebook' Application.
ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: FirstName, LastName, PhoneNumber, BossGroup, Department, BossPickup, ShowInPhonebook, Type, Original_FirstName, Original_LastName, Original_PhoneNumber, Original_BossGroup, Original_Department, Original_BossPickup, Original_ShowInPhoneBook, Original_Type, Original_ItemID.
Description: An unhundled expception occured during the execution of the current web request. Please review the stack trace for more information about the error and where it originiated in the code.
The Stack Trace basiclly showes the same error as above.
Also, when I attempt to delete the record I do not get an error but the record does not delete.
What is interesting is that I can add a record so I do not believe that it is a security permissions issue. I have the ISS Authinication Method Enable Anonymous Access set on with full control.
If anyone has any insight as to why this is occuring please let me know.
View 13 Replies
View Related
Oct 18, 2005
Hi,I have an application that's running fine on development servers (weband database-sql server 2000). I'm updating a record through a thirdparty component but I don't think the component is the problem. What'shappening is that I'm updating fields that are part of view. I'm onlyupdating fields in one table of the view and this works fine in thedevelopment environment.What happens in the production environment when I try to update(using the third party component) I get the following message:"Current recordset does not support updating. This may be a limitationof the provider or of the selected locktype."As an experiment I took the same code but removed the view, leavingonly the table I want to update as the record source. In that case theupdate worked. So it seems that something in the production databasedoesn't like me updating a view. However I can do that in the databasein the development environment.The third party component is dbnetgrid which works fine in thedevelopment environment. I can only conclude it's something about thedatabase that prevents me from updating this same table if it's in aview. I've talked to our DBA but he says there's no difference betweenthe databases. Any ideas would be appreciated.Neil
View 2 Replies
View Related
Jan 16, 2006
In Microsoft SQL Server, I have a documents table and a table whichcategorizes the documents, which we'll call categories.I tried running UPDATE statements on the categories table previouslyand I ran into a foreign key constraint. The error given was "UPDATEstatement conflicted with COLUMN REFERENCE constraint FK..."So I got rid of the Foreign Key relationship, and tried running anUPDATE statement against the categories table again.I'm now getting the following message:'Cannot UPDATE "categories" because "documents" exists.'There must be something hanging around maintaining that relationship,but I'm not sure where it would be found.I was thinking about dropping the table and then adding it back again,but I'm not entirely sure what that would do.Any help is appreciated in advance.thanks,Geoff
View 3 Replies
View Related
Jul 20, 2005
I am unable to update a table (either by opening it and entering datadirectly or through a form). I have set the recordsettype property toupdateable snapshot and have set the permissions to update inside ofthe SQL Server 2000 to checked. Unfortunately, these items have notworked. Any advice is appreciated. Thanks.Dave Christman
View 1 Replies
View Related
May 8, 2007
Windows Update gave a 0X65B error when installing SQL Server 2K5 Express SP2. The solution said to copy the summary.txt data below to this forum:
Time: 05/08/2007 11:06:22.102
KB Number: KB921896
Machine: WA10015USG93127
OS Version: Microsoft Windows XP Professional Service Pack 2 (Build 2600)
Package Language: 1033 (ENU)
Package Platform: x86
Package SP Level: 2
Package Version: 3042
Command-line parameters specified:
/quiet
/allinstances
Cluster Installation: No
**********************************************************************************
Prerequisites Check & Status
SQLSupport: Passed
**********************************************************************************
Products Detected Language Level Patch Level Platform Edition
Express Database Services (SQLEXPRESS) ENU SP1 2005.090.2047.00 x86 EXPRESS
Express Database Services (SQLExpress) ENU SP2 x86 EXPRESS
**********************************************************************************
Products Disqualified & Reason
Product Reason
**********************************************************************************
Processes Locking Files
Process Name Feature Type User Name PID
**********************************************************************************
Product Installation Status
Product : Express Database Services (SQLEXPRESS)
Product Version (Previous): 2047
Product Version (Final) :
Status : Failure
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9Express_Hotfix_KB921896_SQLEXPR.EXE
SQL Express Features : SQL_Data_Files,SQL_Engine,SQL_SharedTools
Error Number : 1627
Error Description : Unable to install Windows Installer MSI file
----------------------------------------------------------------------------------
Product : Express Database Services (SQLExpress)
Product Version (Previous):
Product Version (Final) : 3042
Status : Success
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9Express_Hotfix_KB921896_SQLEXPR.EXE
SQL Express Features : Client_Components,Connectivity,SDK
Error Number : 0
Error Description :
----------------------------------------------------------------------------------
**********************************************************************************
Summary
One or more products failed to install, see above for details
Exit Code Returned: 1627
Any help would be appreciated in getting this service pack installed.
Thanks,
Marty
View 5 Replies
View Related
Jun 18, 2014
I am unable to update the data using record by record below scenario.
Required output:
patient will able to Admit/Re-admit multiple times in hospital, if a patient readmitted multiple times in hospital after the first visit, first visit record will get Re-admission=0 and Index=1. This visit should cal Index_Admission of that patient. using this index_admission should calculate the 30-day readmission.
Current Output:
Calculation: From index_admission discharge date to next admit_visit date,
1) if the diff is having less than 30 days, readmission=1 and Index=0
else readmission=0 and Index=1 should be update.
For checking this every time should check using the latest index_admission discharge_date.
To get this result i written below logic, but it's updating readmission=0 and Index=1 after 30-day post discharge of using first index admission.
UPDATE Readmission
SET Index_AMI = (CASE WHEN DATEDIFF(DD, (SELECT Sub.Max_Index_Dis FROM
(SELECT Patient_ID, MAX(Discharge_Date_Time) Max_Index_Dis FROM Readmission
WHERE Index_AMI = 1 AND FPR.Patient_ID = Patient_ID GROUP BY Patient_ID) Sub)
, FPR.Admit_Date_Time) between 0 and 31 THEN 0 ELSE 1 END),
[Code] ....
Expected Result:
View 5 Replies
View Related
Jan 22, 2007
Hello,
I am having issues and can't see any errors in my code! When attempting to delete a table entry from my SQL database, I get the error "Must declare the scalar variable "@ID1"." even though I declare it as a parameter in my code! Can anyone see an issue with my code below?1 <asp:GridView ID="GridView1" runat="server" AllowSorting="True"
2 DataSourceID="SqlDataSource1" AutoGenerateColumns="False" OnSorted="GridView1_Sorted">
3 <Columns>
4 <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
5 <asp:BoundField DataField="column1" HeaderText="CO" SortExpression="column1" />
6 <asp:BoundField DataField="column2" HeaderText="Network" SortExpression="column2" />
7 <asp:BoundField DataField="column3" HeaderText="C/S/T" SortExpression="column3" />
8 <asp:BoundField DataField="column4" HeaderText="Date Received" SortExpression="column4" DataFormatString="{0:d}" HtmlEncode="False" />
9 <asp:BoundField DataField="DESCRIPTION" HeaderText="Description" SortExpression="DESCRIPTION" />
10 <asp:BoundField DataField="column5" HeaderText="In Service Date" SortExpression="column5" DataFormatString="{0:d}" HtmlEncode="False" />
11 <asp:BoundField DataField="REMARKS" HeaderText="Remarks" SortExpression="REMARKS" />
12 <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
13 SortExpression="ID" />
14 </Columns>
15 </asp:GridView>
16 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConduitConnectionString %>"
17 SelectCommand="SELECT [ID], [CO/Area] AS column1, [NW #] AS column2, [C/S/T] AS column3, [DATE REC'D] AS column4, [DESCRIPTION], [I/S DATE] AS column5, [REMARKS] FROM [Inspector Workload] WHERE ([Inspector Name] = @Inspector_Name) ORDER BY [CO/Area], [DATE REC'D]" DeleteCommand="DELETE FROM [Inspector Workload] WHERE (ID = @ID1)" UpdateCommand="UPDATE [Inspector Workload] SET [CO/Area] = @column1, [NW #] = @column2, [C/S/T] = @column3, [DATE REC'D] = @column4, [DESCRIPTION] = @DESCRIPTION, [I/S DATE] = @column5, [REMARKS] = @REMARKS WHERE ([ID] = @ID1)">
18 <SelectParameters>
19 <asp:QueryStringParameter Name="Inspector_Name" QueryStringField="Name" Type="String" />
20 </SelectParameters>
21 <DeleteParameters>
22 <asp:Parameter Name="ID" Type="Int32" />
23 </DeleteParameters>
24 <UpdateParameters>
25 <asp:Parameter Name="column1" Type="String" />
26 <asp:Parameter Name="column2" Type="Double" />
27 <asp:Parameter Name="column3" Type="String" />
28 <asp:Parameter Name="column4" Type="DateTime" />
29 <asp:Parameter Name="DESCRIPTION" Type="String" />
30 <asp:Parameter Name="column5" Type="DateTime" />
31 <asp:Parameter Name="REMARKS" Type="String" />
32 <asp:Parameter Name="ID" Type="Int32" />
33 </UpdateParameters>
34 </asp:SqlDataSource>
Thanks!Rob.
View 8 Replies
View Related
May 22, 2015
I have an expression based project connection manager in an existing package and updating Packet Size parameter.
After update and clicking on OK, Packet Size value reverts back to 0 (which is old value). This connection manager is used by lot of Dataflow tasks in my package and recreating the connection manager and updating the reference is not a viable option.
View 2 Replies
View Related
Feb 23, 2008
RE: XML Data source .. Expression? Variable? Connection? Error: unable to read the XML data.
I want my XML Data source to be an expression as i will be looping through a directory of xml files.
I don't see the expression property or the connection property??
I tried setting the XMLData property to @[User::filename], but that results in:
Information: 0x40043006 at Load XML Files, DTS.Pipeline: Prepare for Execute phase is beginning.
Error: 0xC02090D0 at Load XML Files, XML Source [108]: The component "XML Source" (108) was unable to read the XML data.
Error: 0xC0047019 at Load XML Files, DTS.Pipeline: component "XML Source" (108) failed the prepare phase and returned error code 0xC02090D0.
Information: 0x4004300B at Load XML Files, DTS.Pipeline: "component "OLE DB Destination" (341)" wrote 0 rows.
Task failed: Load XML Files
Information: 0xC002F30E at Bad, File System Task: File or directory "d:jcpxmlLoadjcp2.xml.bad" was deleted.
Warning: 0x80019002 at Package: The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "Package.dtsx" finished: Failure.
The program '[3312] Package.dtsx: DTS' has exited with code 0 (0x0).
Thanks for any help or information.
View 3 Replies
View Related
Apr 11, 2007
I'm trying to figure this out
I have a store procedure that return the userId if a user exists in my table, return 0 otherwise
------------------------------------------------------------------------
Create Procedure spUpdatePasswordByUserId
@userName varchar(20),
@password varchar(20)
AS
Begin
Declare @userId int
Select @userId = (Select userId from userInfo Where userName = @userName and password = @password)
if (@userId > 0)
return @userId
else
return 0
------------------------------------------------------------------
I create a function called UpdatePasswordByUserId in my dataset with the above stored procedure that returns a scalar value. When I preview the data from the table adapter in my dataset, it spits out the right value.
But when I call this UpdatepasswordByUserId from an asp.net page, it returns null/blank/0
passport.UserInfoTableAdapters oUserInfo = new UserInfoTableAdapters();
Response.Write("userId: " + oUserInfo.UpdatePasswordByUserId(txtUserName.text, txtPassword.text) );
Do you guys have any idea why?
View 6 Replies
View Related
Jun 28, 2012
I have a sql server 2008 backend with an Access 2007 frontend database. Each time I export a query I get the following error:
Code:
Microsoft Access was unable to append all the data to the table.
The contents of fields in 0 record(s) were deleted, and 1 record(s) were lost due to key violations.
*If data was deleted, the data you pasted or imported doesn't match the field data types or the FieldSize property in the destination table.
*If records were lost, either the records you pasted contain primary key values that already exist in the destination table, or they violate referential integrity rules for a relationship defined between tables. Do you want to proceed anyway?
I don't know what if anything is actually missing because of the amount of data is more thant 6000 records. It seems everything exported but I would have to comb through the data to be sure.
View 3 Replies
View Related
Dec 3, 2007
used enteprise manager to retrieve a group of data from one of our files. We have id set and need to bring these key fields back online for application to work. Help !!!..
we tried a demo software called apexsql to assist in the restore, however this does not update the files one by one..
thank you in advance..
jrdubya
View 1 Replies
View Related
Nov 2, 2006
Hello -
I am trying to pull data from SQL Server 2000 database onto my Pocket PC and the simple query works on Northwind sample database but does not on another custom build database. I did test the statement in the SQL Query Analyzer and it works.
The error I get is: "Failure setting up a non parameterized query, possible incorrect SQL query."
I know the code is right - thanks to Rory B's screenscasts. Any guidance will be greatly appreciated!
Thanks!
Moldau
Here is the code:
private void RdaPull()
{
try
{
//Create the database
if (File.Exists("\My Documents\Test.sdf"))
File.Delete(\My Documents\Test.sdf);
SqlCeEngine engine = new SqlCeEngine();
engine.LocalConnectionString = localConnection;
engine.CreateDatabase();
engine.Dispose();
//Initialize RDA Object
SqlCeRemoteDataAccess rda = null;
rda = new SqlCeRemoteDataAccess(rdaUrl, localConnection);
rda.Pull ("Customers", "select * from Customers", rdaOleDbConnectionString);
rda.Dispose();
MessageBox.Show("Done");
}
catch (SqlCeException ex)
{
MessageBox.Show(ex.Message);
}
View 7 Replies
View Related
Mar 25, 2008
HI all
I've used textboxes to insert data to database but when i click save button everything is ok but when i check in the database the values are null evrywhere below is my code. i am trying to save to different databases pls help!!
</table>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 157%; height: 32px;" bordercolor="#111111">
<tr><td width="100%" colspan="6" bgcolor="#eeeddb" align="center" style="height: 36px">
</td><tr>
<tr><td width="100%" colspan="6" bgcolor="#ffcc33" align="center" style="height: 41px">
<font color="#000000">Passenger's Details</font></td><tr>
<td bgcolor="#eeeddb" style="width: 164px; height: 16px;">Surname</td>
<td bgcolor="#eeeddb" style="width: 160px; height: 16px;">
Name</td>
<td bgcolor="#eeeddb" style="width: 129px; height: 16px;">
Initials</td>
<td bgcolor="#eeeddb" style="width: 17%; height: 16px;">
Title</td>
<td bgcolor="#eeeddb" style="width: 148px; height: 16px;">
Tel</td>
<td bgcolor="#eeeddb" style="width: 234px; height: 16px;">
Fax</td>
</tr>
<tr>
<td style="width: 164px">
<asp:TextBox ID="TextBox21" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 160px">
<asp:TextBox ID="TextBox22" runat="server" Enabled="False"></asp:TextBox></td>
<td>
<asp:TextBox ID="TextBox24" runat="server" Enabled="False"></asp:TextBox></td>
<td>
<asp:TextBox ID="TextBox26" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 148px">
<asp:TextBox ID="TextBox27" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 234px">
<asp:TextBox ID="TextBox28" runat="server" Enabled="False"></asp:TextBox></td>
</tr>
<tr>
<td bgcolor="#eeeddb" style="width: 164px; height: 16px;">Frequent Flyer Number</td>
<td bgcolor="#eeeddb" style="width: 160px; height: 16px;">
Seating Preference</td>
</tr>
<tr><td style="width: 164px">
<asp:TextBox ID="TextBox54" runat="server" Enabled="False"></asp:TextBox></td><td style="width: 160px">
<asp:TextBox ID="TextBox55" runat="server" Enabled="False"></asp:TextBox></td></tr>
</table>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 157%;" bordercolor="#111111" height="32">
<tr><td width="100%" colspan="7" bgcolor="#eeeddb" align="center" style="height: 32px">
</td><tr>
<tr><td width="100%" colspan="7" bgcolor="#ffcc33" align="center" style="height: 37px">
<font color="#000000">Flight's Details</font></td>
</tr>
<tr>
<tr >
<td bgcolor="#eeeddb" style="width: 154px;" height="16">
Routing:</td>
<td style="width: 151px" bgcolor="#eeeddb" height="16" >
From</td>
<td style="width: 14%" bgcolor="#eeeddb" height="16">
To</td>
<td bgcolor="#eeeddb" style="width: 17%;" height="16" >
Dept Time</td>
<td style="width: 148px" bgcolor="#eeeddb" height="16">
Arriv Time</td>
<td style="width: 227px" bgcolor="#eeeddb" height="16" >
Flight</td>
<td bgcolor="#eeeddb" height="16" style="width: 137px" >
Class</td>
</tr>
<tr>
<td style="width: 154px">
<asp:Label ID="Label16" runat="server" Enabled="False" Font-Bold="True" Text="Leg 1"></asp:Label></td>
<td style="width: 151px">
<asp:TextBox ID="TextBox38" runat="server" Width="120px" Enabled="False"></asp:TextBox></td>
<td>
<asp:TextBox ID="TextBox41" runat="server" Enabled="False"></asp:TextBox></td>
<td>
<asp:TextBox ID="TextBox44" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 148px">
<asp:TextBox ID="TextBox47" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 227px">
<asp:TextBox ID="TextBox35" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 137px">
<asp:TextBox ID="TextBox82" runat="server" Enabled="False"></asp:TextBox></td></tr>
<tr>
<td style="width: 154px">
<asp:Label ID="Label5" runat="server" Enabled="False" Font-Bold="True" Text="Leg 2"></asp:Label></td>
<td style="width: 151px">
<asp:TextBox ID="TextBox39" runat="server" Width="120px" Enabled="False"></asp:TextBox></td>
<td>
<asp:TextBox ID="TextBox43" runat="server" Enabled="False"></asp:TextBox></td>
<td>
<asp:TextBox ID="TextBox45" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 148px">
<asp:TextBox ID="TextBox48" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 227px">
<asp:TextBox ID="TextBox36" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 111px">
<asp:TextBox ID="TextBox83" runat="server" Enabled="False"></asp:TextBox></td></tr>
<tr>
<td style="width: 154px; height: 25px;">
<asp:Label ID="Label8" runat="server" Enabled="False" Font-Bold="True" Text="Leg 3"></asp:Label></td>
<td style="width: 151px; height: 25px;">
<asp:TextBox ID="TextBox40" runat="server" Width="120px" Enabled="False"></asp:TextBox></td>
<td style="height: 25px">
<asp:TextBox ID="TextBox42" runat="server" Enabled="False"></asp:TextBox></td>
<td style="height: 25px">
<asp:TextBox ID="TextBox46" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 148px; height: 25px;">
<asp:TextBox ID="TextBox49" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 227px; height: 25px;">
<asp:TextBox ID="TextBox37" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 137px; height: 25px;">
<asp:TextBox ID="TextBox84" runat="server" Enabled="False" Height="14px" Width="147px"></asp:TextBox></td></tr>
</table>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 157%;" bordercolor="#111111" height="32" id="TABLE2">
<tr><td width="100%" colspan="6" bgcolor="#eeeddb" align="center" style="height: 38px">
</td><tr><tr>
<td colspan="7" bgcolor="#ffcc33" align="center" style="height: 37px; width: 107%;"><font color="#000000">Accomodation's Details</font></td>
</tr><tr>
<td bgcolor="#eeeddb" style="width: 41px; height: 29px;">Routing:</td>
<td bgcolor="#eeeddb" style="width: 76px; height: 29px;">
Hotel Name</td>
<td bgcolor="#eeeddb" style="width: 14%; height: 29px;">
Check-in Date</td>
<td bgcolor="#eeeddb" style="width: 17%; height: 29px;">
Check-out Date</td>
<td bgcolor="#eeeddb" style="width: 113px; height: 29px;">
Room Type</td>
<td bgcolor="#eeeddb" style="width: 113px; height: 29px;">Included</td>
</tr>
<tr>
<td style="width: 41px; height: 31px;">
<asp:Label ID="Label9" runat="server" Enabled="False" Font-Bold="True" Text="Leg 1"></asp:Label></td>
<td style="width: 76px; height: 31px;">
<asp:TextBox ID="TextBox30" runat="server" Enabled="False"></asp:TextBox></td>
<td style="height: 31px">
<asp:TextBox ID="TextBox50" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 148px; height: 31px;">
<asp:TextBox ID="TextBox53" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 232px; height: 31px;">
<asp:TextBox ID="TextBox29" runat="server" Enabled="False"></asp:TextBox></td>
<td>
<asp:TextBox ID="TextBox85" runat="server" Enabled="False"></asp:TextBox>
</td>
</tr>
<tr>
<td style="width: 41px; height: 26px">
<asp:Label ID="Label10" runat="server" Enabled="False" Font-Bold="True" Text="Leg 2"></asp:Label></td>
<td style="width: 76px; height: 26px">
<asp:TextBox ID="TextBox33" runat="server" Enabled="False"></asp:TextBox></td>
<td style="height: 26px">
<asp:TextBox ID="TextBox51" runat="server" Enabled="False"></asp:TextBox></td>
<td style="height: 26px">
<asp:TextBox ID="TextBox56" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 148px; height: 26px;">
<asp:TextBox ID="TextBox31" runat="server" Enabled="False"></asp:TextBox></td>
<td>
<asp:TextBox ID="TextBox86" runat="server" Enabled="False"></asp:TextBox>
</td></tr>
<tr>
<td style="height: 20px; width: 41px;">
<asp:Label ID="Label11" runat="server" Enabled="False" Font-Bold="True" Text="Leg 3"></asp:Label></td>
<td style="height: 20px; width: 76px;">
<asp:TextBox ID="TextBox32" runat="server" Enabled="False"></asp:TextBox></td>
<td style="height: 20px">
<asp:TextBox ID="TextBox52" runat="server" Enabled="False"></asp:TextBox></td>
<td style="height: 20px">
<asp:TextBox ID="TextBox57" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 148px; height: 20px;">
<asp:TextBox ID="TextBox34" runat="server" Enabled="False"></asp:TextBox></td>
<td>
<asp:TextBox ID="TextBox87" runat="server" Enabled="False"></asp:TextBox>
</td></tr>
</table>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 157%;" bordercolor="#111111" height="32" id="TABLE3">
<tr><td width="100%" colspan="6" bgcolor="#eeeddb" align="center" style="height: 38px">
</td><tr><tr>
<td colspan="7" bgcolor="#ffcc33" align="center" style="height: 37px; width: 107%;"><font color="#000000">Vehicle's Details</font></td>
</tr><tr>
<td bgcolor="#eeeddb" style="width: 130px; height: 26px;">Company</td>
<td bgcolor="#eeeddb" style="width: 20%; height: 26px;">
Group</td>
<td bgcolor="#eeeddb" style="width: 129px; height: 26px;">
Pick-up Date</td>
<td bgcolor="#eeeddb" style="width: 17%; height: 26px;">
Pick-up Time</td>
<td bgcolor="#eeeddb" style="width: 113px; height: 26px;">Pick-up Addresss</td>
</tr><tr>
<td style="height: 20px">
<asp:TextBox ID="TextBox58" runat="server" Width="169px" Enabled="False"></asp:TextBox></td>
<td style="height: 20px">
<asp:TextBox ID="TextBox59" runat="server" Width="163px" Enabled="False"></asp:TextBox></td>
<td style="height: 20px">
<asp:TextBox ID="TextBox61" runat="server" Enabled="False"></asp:TextBox>
</td>
<td style="height: 20px">
<asp:TextBox ID="TextBox62" runat="server" Enabled="False"></asp:TextBox>
</td>
<td style="height: 20px">
<asp:TextBox ID="TextBox60" runat="server" Enabled="False"></asp:TextBox></td>
</tr><tr>
<td style="height: 22px">
<asp:TextBox ID="TextBox63" runat="server" Width="169px" Enabled="False"></asp:TextBox></td>
<td style="height: 22px">
<asp:TextBox ID="TextBox64" runat="server" Width="163px" Enabled="False"></asp:TextBox></td>
<td style="height: 22px">
<asp:TextBox ID="TextBox65" runat="server" Enabled="False"></asp:TextBox>
</td>
<td style="height: 22px">
<asp:TextBox ID="TextBox66" runat="server" Enabled="False"></asp:TextBox>
</td>
<td style="height: 22px">
<asp:TextBox ID="TextBox67" runat="server" Enabled="False"></asp:TextBox></td>
</tr><tr>
<td style="height: 20px">
<asp:TextBox ID="TextBox68" runat="server" Width="169px" Enabled="False"></asp:TextBox></td>
<td style="height: 20px">
<asp:TextBox ID="TextBox69" runat="server" Width="163px" Enabled="False"></asp:TextBox></td>
<td style="height: 20px">
<asp:TextBox ID="TextBox70" runat="server" Enabled="False"></asp:TextBox>
</td>
<td style="height: 20px">
<asp:TextBox ID="TextBox71" runat="server" Enabled="False"></asp:TextBox>
</td>
<td style="height: 20px">
<asp:TextBox ID="TextBox72" runat="server" Enabled="False"></asp:TextBox></td>
</tr>
<tr>
<td bgcolor="#eeeddb" style="width: 14%; height: 16px;">
Drop-off Date</td>
<td bgcolor="#eeeddb" style="width: 17%; height: 16px;">
Drop-off Time</td>
<td bgcolor="#eeeddb" style="width: 129px; height: 16px;">Drop-off Addresss</td></tr>
<tr><tr>
<td><asp:TextBox ID="TextBox74" runat="server" Enabled="False"></asp:TextBox>
</td>
<td>
<asp:TextBox ID="TextBox75" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 129px"><asp:TextBox ID="TextBox73" runat="server" Width="183px" Enabled="False"></asp:TextBox></td>
</tr>
<tr>
<td style="height: 19px"><asp:TextBox ID="TextBox76" runat="server" Enabled="False"></asp:TextBox>
</td>
<td style="height: 19px">
<asp:TextBox ID="TextBox77" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 129px; height: 19px;"><asp:TextBox ID="TextBox78" runat="server" Width="183px" Enabled="False"></asp:TextBox></td>
</tr>
<tr>
<td><asp:TextBox ID="TextBox79" runat="server" Enabled="False"></asp:TextBox>
</td>
<td>
<asp:TextBox ID="TextBox80" runat="server" Enabled="False"></asp:TextBox></td>
<td style="width: 129px"><asp:TextBox ID="TextBox81" runat="server" Width="183px" Enabled="False"></asp:TextBox></td>
</tr>
</table><table>
<tr>
<td style="width: 731px">
<br />
<br />
<asp:Button id="Button5" Text="Previous step" OnClick="PrevStep" runat="server"/>
<asp:Button ID="Save" runat="server" Text="Save" />
<input id="Button3" hidefocus="hidefocus" onclick="printpage(this)" type="button" value="Print" />
<input id="Button4" onclick="exit()" type="button" value="Cancel" /></td>
</tr>
</table>
</asp:Panel>
<!--/fieldset-->
</div>
<br />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Travel BookingConnectionString7 %>"
DeleteCommand="DELETE FROM [Accomodation] WHERE [AccID] = @AccID" InsertCommand="INSERT INTO [Accomodation] ([Routing], [Hotel Name], [Check in date], [Check out date], [Included], [Room Type]) VALUES (@Routing, @Hotel_Name, @Check_in_date, @Check_out_date, @Included, @Room_Type)"
SelectCommand="SELECT [AccID], [Routing], [Hotel Name] AS Hotel_Name, [Check in date] AS Check_in_date, [Check out date] AS Check_out_date, [Included], [Room Type] AS Room_Type FROM [Accomodation]"
UpdateCommand="UPDATE [Accomodation] SET [Routing] = @Routing, [Hotel Name] = @Hotel_Name, [Check in date] = @Check_in_date, [Check out date] = @Check_out_date, [Included] = @Included, [Room Type] = @Room_Type WHERE [AccID] = @AccID">
<DeleteParameters>
<asp:Parameter Name="AccID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Routing" Type="String" />
<asp:Parameter Name="Hotel_Name" Type="String" />
<asp:Parameter Name="Check_in_date" Type="String" />
<asp:Parameter Name="Check_out_date" Type="String" />
<asp:Parameter Name="Included" Type="String" />
<asp:Parameter Name="Room_Type" Type="String" />
<asp:Parameter Name="AccID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:FormParameter Name="Routing" FormField="Label9" />
<asp:FormParameter Name="Hotel_Name" FormField="Textbox30" />
<asp:FormParameter Name="Check_in_date" FormField="Textbox50" />
<asp:FormParameter Name="Check_out_date" FormField="Textbox53" />
<asp:FormParameter Name="Included" FormField="Textbox85" /><asp:FormParameter Name="Room_Type" FormField="Textbox29" />
</InsertParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:Travel BookingConnectionString8 %>"
DeleteCommand="DELETE FROM [Flights] WHERE [FlightID] = @FlightID" InsertCommand="INSERT INTO [Flights] ([Routing], [Date], [From Date], [To Date], [Dept Time], [Arrive Time], [Flight], [Class]) VALUES (@Routing, @Date, @From_Date, @To_Date, @Dept_Time, @Arrive_Time, @Flight, @Class)"
SelectCommand="SELECT [FlightID], [Routing], [Date], [From Date] AS From_Date, [To Date] AS To_Date, [Dept Time] AS Dept_Time, [Arrive Time] AS Arrive_Time, [Flight], [Class] FROM [Flights]"
UpdateCommand="UPDATE [Flights] SET [Routing] = @Routing, [Date] = @Date, [From Date] = @From_Date, [To Date] = @To_Date, [Dept Time] = @Dept_Time, [Arrive Time] = @Arrive_Time, [Flight] = @Flight, [Class] = @Class WHERE [FlightID] = @FlightID">
<DeleteParameters>
<asp:Parameter Name="FlightID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Routing" Type="String" />
<asp:Parameter Name="Date" Type="DateTime" />
<asp:Parameter Name="From_Date" Type="String" />
<asp:Parameter Name="To_Date" Type="String" />
<asp:Parameter Name="Dept_Time" Type="DateTime" />
<asp:Parameter Name="Arrive_Time" Type="DateTime" />
<asp:Parameter Name="Flight" Type="String" />
<asp:Parameter Name="Class" Type="String" />
<asp:Parameter Name="FlightID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Routing" Type="String" />
<asp:Parameter Name="Date" Type="DateTime" />
<asp:Parameter Name="From_Date" Type="String" />
<asp:Parameter Name="To_Date" Type="String" />
<asp:Parameter Name="Dept_Time" Type="DateTime" />
<asp:Parameter Name="Arrive_Time" Type="DateTime" />
<asp:Parameter Name="Flight" Type="String" />
<asp:Parameter Name="Class" Type="String" />
</InsertParameters></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:Travel BookingConnectionString4 %>"
DeleteCommand="DELETE FROM [Passenger] WHERE [PassengerID] = @PassengerID" InsertCommand="INSERT INTO [Passenger] ([Surname], [Name], [Initials], [Title], [Tel], [Fax], [FrequentFlyerNumber], [SeatingPreference], [Account Number], [OrderNo], [VehicleID], [AccomodationID], [FlightID], [Travel Consultant]) VALUES (@Surname, @Name, @Initials, @Title, @Tel, @Fax, @FrequentFlyerNumber, @SeatingPreference, @Account_Number, @OrderNo, @VehicleID, @AccomodationID, @FlightID, @Travel_Consultant)"
SelectCommand="SELECT [PassengerID], [Surname], [Name], [Initials], [Title], [Tel], [Fax], [FrequentFlyerNumber], [SeatingPreference], [Account Number] AS Account_Number, [OrderNo], [VehicleID], [AccomodationID], [FlightID], [Travel Consultant] AS Travel_Consultant FROM [Passenger]"
UpdateCommand="UPDATE [Passenger] SET [Surname] = @Surname, [Name] = @Name, [Initials] = @Initials, [Title] = @Title, [Tel] = @Tel, [Fax] = @Fax, [FrequentFlyerNumber] = @FrequentFlyerNumber, [SeatingPreference] = @SeatingPreference, [Account Number] = @Account_Number, [OrderNo] = @OrderNo, [VehicleID] = @VehicleID, [AccomodationID] = @AccomodationID, [FlightID] = @FlightID, [Travel Consultant] = @Travel_Consultant WHERE [PassengerID] = @PassengerID">
<DeleteParameters>
<asp:Parameter Name="PassengerID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Surname" Type="String" />
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="Initials" Type="String" />
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Tel" Type="String" />
<asp:Parameter Name="Fax" Type="String" />
<asp:Parameter Name="FrequentFlyerNumber" Type="String" />
<asp:Parameter Name="SeatingPreference" Type="String" />
<asp:Parameter Name="Account_Number" Type="String" />
<asp:Parameter Name="OrderNo" Type="Int32" />
<asp:Parameter Name="VehicleID" Type="Int32" />
<asp:Parameter Name="AccomodationID" Type="Int32" />
<asp:Parameter Name="FlightID" Type="Int32" />
<asp:Parameter Name="Travel_Consultant" Type="String" />
<asp:Parameter Name="PassengerID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:formParameter Name="Surname" formfield="Textbox21" />
<asp:formParameter Name="Name" formfield="Textbox22" />
<asp:formParameter Name="Initials" formfield="Textbox24" />
<asp:formParameter Name="Title" formfield="Textbox26" />
<asp:formParameter Name="Tel" formfield="Textbox27" />
<asp:formParameter Name="Fax" formfield="Textbox28" />
<asp:formParameter Name="FrequentFlyerNumber" formfield="Textbox29" />
<asp:formParameter Name="SeatingPreference" formfield="Textbox55" />
<asp:formParameter Name="Account_Number" formfield="Textbox18" />
<asp:formParameter Name="OrderNo" formfield="Label2" />
<asp:Parameter Name="VehicleID" Type="Int32" />
<asp:Parameter Name="AccomodationID" Type="Int32" />
<asp:Parameter Name="FlightID" Type="Int32" />
<asp:formParameter Name="Travel_Consultant" formfield="Textbox19" />
</InsertParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:Travel BookingConnectionString5 %>"
DeleteCommand="DELETE FROM [Vehicle] WHERE [VehicleID] = @VehicleID" InsertCommand="INSERT INTO [Vehicle] ([Company Name], [Group], [Pick Up Time], [Pick Up Date], [Drop Off Address], [Drop Off Time], [Drop Off Date], [Pick up Address]) VALUES (@Company_Name, @Group, @Pick_Up_Time, @Pick_Up_Date, @Drop_Off_Address, @Drop_Off_Time, @Drop_Off_Date, @Pick_up_Address)"
SelectCommand="SELECT [VehicleID], [Company Name] AS Company_Name, [Group], [Pick Up Time] AS Pick_Up_Time, [Pick Up Date] AS Pick_Up_Date, [Drop Off Address] AS Drop_Off_Address, [Drop Off Time] AS Drop_Off_Time, [Drop Off Date] AS Drop_Off_Date, [Pick up Address] AS Pick_up_Address FROM [Vehicle]"
UpdateCommand="UPDATE [Vehicle] SET [Company Name] = @Company_Name, [Group] = @Group, [Pick Up Time] = @Pick_Up_Time, [Pick Up Date] = @Pick_Up_Date, [Drop Off Address] = @Drop_Off_Address, [Drop Off Time] = @Drop_Off_Time, [Drop Off Date] = @Drop_Off_Date, [Pick up Address] = @Pick_up_Address WHERE [VehicleID] = @VehicleID">
<DeleteParameters>
<asp:Parameter Name="VehicleID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Company_Name" Type="String" />
<asp:Parameter Name="Group" Type="String" />
<asp:Parameter Name="Pick_Up_Time" Type="DateTime" />
<asp:Parameter Name="Pick_Up_Date" Type="String" />
<asp:Parameter Name="Drop_Off_Address" Type="String" />
<asp:Parameter Name="Drop_Off_Time" Type="DateTime" />
<asp:Parameter Name="Drop_Off_Date" Type="String" />
<asp:Parameter Name="Pick_up_Address" Type="String" />
<asp:Parameter Name="VehicleID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Company_Name" Type="String" />
<asp:Parameter Name="Group" Type="String" />
<asp:Parameter Name="Pick_Up_Time" Type="DateTime" />
<asp:Parameter Name="Pick_Up_Date" Type="String" />
<asp:Parameter Name="Drop_Off_Address" Type="String" />
<asp:Parameter Name="Drop_Off_Time" Type="DateTime" />
<asp:Parameter Name="Drop_Off_Date" Type="String" />
<asp:Parameter Name="Pick_up_Address" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:Travel BookingConnectionString6 %>"
DeleteCommand="DELETE FROM [Order] WHERE [OrderNo] = @OrderNo" SelectCommand="SELECT * FROM [Order]" InsertCommand="INSERT INTO [Order] ([Date]) VALUES (@Date)" UpdateCommand="UPDATE [Order] SET [Date] = @Date WHERE [OrderNo] = @OrderNo">
<DeleteParameters>
<asp:Parameter Name="OrderNo" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Date" Type="DateTime" />
<asp:Parameter Name="OrderNo" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Date" Type="DateTime" />
</InsertParameters>
</asp:SqlDataSource>Protected Sub Save_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Save.Click
SqlDataSource1.Insert()
SqlDataSource2.Insert()
SqlDataSource3.Insert()
SqlDataSource4.Insert()
End Sub
thanx in advance
View 7 Replies
View Related
Jun 6, 2005
I have a locally installed MS SQL server 2000. I am trying to retrieve the contents of the table onto a datagrid. But when I use the user name and password, It gives the following errorSystem.Data.SqlClient.SqlException: Login failed for user 'aroop'. Reason: Not associated with a trusted SQL Server connection. string connectionString = "server=(local); uid=aroop; pwd=abcdef; database=mydb"; string commandString = "select * from mytable"; SqlDataAdapter dataAdapter = new SqlDataAdapter(commandString, connectionString);
DataSet dataSet = new DataSet(); dataAdapter.Fill(dataSet);
dgEmployees.DataSource = dataSet; dgEmployees.DataBind();Can someone please let me know what to do about this?
View 1 Replies
View Related
Feb 4, 2014
I came across a weird issue this morning while using Between operator am unable to retrieve data that starts with second option,
Example am using
select * from USER where vendor between 'N' and 'V'
Here I expect to get all the records that has vendor name starting with N,O,P,......U,V
But to my surprise i found am just getting N,O ......,U. I am unable to retrieve vendors start with 'V'
when i use between 'N' and 'W' it shows with 'V' also........but not showing vendors with 'W'
So I doubt whether between is considering second option 'V' or not.
View 8 Replies
View Related
Jul 7, 2006
Im having trouble creating a new connection through Visual Studio Web Developer. When I try to add a new connection all it gives me is an error-
Unable to add data connection
The DataConnectionDialog could not be intialized
When I test my page it seems alright going to the localhost but when I try to add a connection it wont let me.
What could be the cause?
And how can I fix this problem?
I want to connect to the sql server on my computer.. I cant because of the error above
View 1 Replies
View Related
Apr 17, 2007
hey guys... i have some problem here... i am trying to display data out on the text field and these are the codes that i have added... i have a few pages with the same codes but onli this particular page can't work...
when the webpage first load, it will load all the username onto ListBox1... when the user choose a data from ListBox1 and click button3, it will show all the data of that particular user that the user had selected and display them on the text fields provide... but the data could not display the data... is there something wrong with my codings??
These are my coding:
Imports System.Data
Imports System.Data.SqlClient
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Label6.Text = Session("Un")
Dim connSel As New SqlConnection("data source=localhost; initial catalog=Sourcing; integrated security=true")
Dim adapSel As SqlDataAdapter
Dim mySQL As String
mySQL = "select UserName from Users "
adapSel = New SqlDataAdapter(mySQL, connSel)
connSel.Open()
Dim dsSel As New DataSet
adapSel.Fill(dsSel)
ListBox1.DataSource = dsSel
ListBox1.DataTextField = "UserName"
ListBox1.DataValueField = "UserName"
ListBox1.DataBind()
connSel.Close()
End Sub
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim conn As New SqlConnection("data source=localhost; initial catalog=Sourcing;" & "integrated security=true")
Dim cmd As New SqlCommand("select * from Users where UserName = '" & ListBox1.SelectedValue & "'", conn)
conn.Open()
Dim dr As SqlDataReader
dr = cmd.ExecuteReader()
Do While dr.Read()
UserTxt.Text = dr("UserName")
PwdTxt.Text = dr("Password")
BranchTxt.Text = dr("Branch")
CountryTxt.Text = dr("Country")
PriTxt.Text = dr("Priority")
Loop
dr.Close()
conn.Close()
End Sub
End Class
View 4 Replies
View Related
Oct 31, 2007
Hi all,
I've created a database named HyperCodexDB.mdf and I'm trying to extract some information from, I've no error, but the code after Open() method is even not executed:
Here is the Web.Config
and in the .cs file :
Hashtable names = new Hashtable();
int i = 0;
string conn_str = ConfigurationManager.ConnectionStrings["hcConnectionString"].ConnectionString;
SqlConnection con = new SqlConnection(conn_str);
SqlCommand cmd;
cmd = new SqlCommand("SELECT Nom FROM TableRecueil", con);
SqlDataReader rdr = null;
try
{
Label1.Text = "Hello"; ////////????Here changes the value of the label
con.Open();
Label1.Text = "Bye"; ////////????But here the value of Label1.Text remains "Hello"
rdr = cmd.ExecuteReader();
while (rdr.Read())
{
names.Add(i, rdr["Nom"]);
i++;
}
Label1.Text = names[0].ToString();
}
catch (SqlException ex){ }
finally
{if (rdr != null)
{rdr.Close();}
if (con != null)
{con.Close();}}
Thanks in advance
Ali
View 8 Replies
View Related
Feb 13, 2007
I am having trouble with BCP. I get the same error with xp_cmdshell as I do with entering bcp as a DOS command. I have checked and rechecked the file names and permissions and even restart the PC.
Does BCP even work when SQL Server 2005 Express on a PC?
declare @sql varchar(8000)
select @sql = 'bcp SYMITAR..ACCOUNT in C: estEXTRACT.ACCOUNT -T -f C: estACCOUNT.FMT -S'+@@servername
exec SYMITAR..xp_cmdshell @sql
GO
Volume in drive C has no label.
Volume Serial Number is 08E5-2414
Directory of C: est
02/13/2007 08:44 AM <DIR> .
02/13/2007 08:44 AM <DIR> ..
08/31/2006 09:11 AM 27,503,161 EXTRACT.ACCOUNT
08/31/2006 09:12 AM 6,879 FMT.ACCOUNT
02/07/2007 08:46 AM 220 ACCTTYPE.FMT
02/13/2007 08:44 AM 0 filelisting.txt
02/07/2007 08:33 AM 220 ACCTTYPE.xml
5 File(s) 27,510,480 bytes
2 Dir(s) 54,344,847,360 bytes free
Could the fact that it's actually pulling BCP from c:Program FilesMicrosoft SQL Server80Toolsinn be a problem? I know this because it doesn't recognize the -x extensionof the bcp command.
PATH:
%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;C:Program FilesCommon FilesGTK2.0in;C:Program FilesMicrosoft SQL Server80ToolsBINN;c:Program FilesMicrosoft SQL Server90Toolsinn;c:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssemblies;c:Program FilesMicrosoft SQL Server90DTSBinn;c:Program FilesMicrosoft SQL Server90ToolsBinnVSShellCommon7IDE;C:Program FilesQuickTimeQTSystem
...
I added the c: est to the path and removed c:Program FilesMicrosoft
SQL Server80Toolsinn from the path. While it recognizes the -x
extension now it still gets the same error message:
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to open BCP host data-file
NULL
View 11 Replies
View Related
Feb 24, 2007
I have recently installed Microsoft SQL Server 2005 Express. The installation seemed to go OK (Dell Optiplex I86, Win2K).
The SQL Server Management Studio Express (also installed OK) appears to connect to the database server and shows the database tree as I would expect, consisting of Databases, Security, Server Objects, Replication, and Management.
However, when I attempt to create a new data source (Control Panel->Administrative Tools->Data Sources(ODBC ->ODBC Data Source Administrator -> Add->SQL Server)
Name: MYSQLS1
Descr: Test SQL Server
Server: (local)
(Next->)
x With Windows NT Authentication using the network login ID
[Client Configuration]
Server Alias: MYSQLS1
Server Name: MYSQLS1
x TCP/TP
x Dynamically determine port [1433]
(Next->)
RESULT:
Connection failed:
SQLState: '01000'
SQL Server Error: 11001
[Microsoft][ODC SQL Server Driver][TCP/IP Sockets]ConnectionOpen(Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 6
[Microsoft][ODC SQL Server Driver][Shared Memory]Specified SQL Server not found.
Can anyone please tell me what's going on here ? What am I doing wrong?
View 15 Replies
View Related
May 10, 2007
Hello,
I have checked file names, and I have checked permissions on the files. I do not see any reason why the BCP should fail. Any ideas how I can debug this further?
Thanks
Tom
View 1 Replies
View Related
Dec 12, 2014
I run the following statement and it will not update beyond 7 million plus rows and I have about 38 million to complete. I keep checking updated row counts and after 1/2 day it's still the same so I know something is wrong because it was rolling through no problem when I initiated it. I need to complete ASAP so it's adding to my frustration. The 'Acct_Num_CH' field is an encrypted field (fyi).
SET rowcount 10000
UPDATE [dbo].[CC_Info_T]
SET [Acct_Num_CH] = 'ayIWt6C8sgimC6t61EJ9d8BB3+bfIZ8v'
WHERE [Acct_Num_CH] IS NOT NULL
WHILE @@ROWCOUNT > 0
BEGIN
SET rowcount 10000
UPDATE [dbo].[CC_Info_T]
SET [Acct_Num_CH] = 'ayIWt6C8sgimC6t61EJ9d8BB3+bfIZ8v'
WHERE [Acct_Num_CH] IS NOT NULL
END
SET rowcount 0
View 5 Replies
View Related
Nov 27, 2006
This just happened today and I dont know why. I have a database on a SQL server 2005 database, that has a table called photos. It contains image data, but not the column says <Unable to read data>. But before that I get an error when I try to execute the table to retreive the data. The error is below. SQL Execution Error:Executed SQL statement: SELECT ID, AlbumID, Caption, BytesOriginal, BytesFull, BytesThumb FROM PhotosError Source: System.DataError Message: Invalid attempt to Read when reader is closed. This happens with SQL Server Management Studio, and Visual Studio 2005 when I try to access it. I tried two computers so its not that. Any help or insight would be appreciated.
View 2 Replies
View Related
Sep 30, 2013
I am trying to join two tables together, on the same field except they have different data types, see the properties below
Code:
TableCOLUMN_NAMEDATA_TYPECHARACTER MAXIMUM LENGTHCHARACTER OCTET LENGTHCHARACTER SET NAMECOLLATION NAME
1itemClassnvarchar 512 1024 UNICODE Latin1_General_CI_AI
2PGCode varchar 3 3 iso_1 Latin1_General_CI_AS
in the code for the join,
Code:
left join common.dbo.qryPRDGroupDets on CAST(qryData_GB1_ByColumn.itemclass as varchar(3)) = Cast(common.dbo.qryPRDGroupDets.PGCode as varchar(3))
I have tried using the CAST function on one side of the join then on both, to no avail...
View 6 Replies
View Related
Apr 26, 2007
Hi,I'm trying to do retrieve some data from a table where the content isin Greek, however, thequery is not working. It's a very simple statement, but I'm missingsomething.Here is the table...if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[REPORT_LOCALE]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [dbo].[REPORT_LOCALE]GOCREATE TABLE [dbo].[REPORT_LOCALE] ([XL_REPORT_ID] [int] NULL ,[TEXT_NAME] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_ASNULL ,[LOCALE] [int] NULL) ON [PRIMARY]GOThe first statment shows me a number of rows. I copied the content ofthe Text_Name column and pasteit into QA to form the second statement. However, the second statementreturns no data.SELECT * FROM Report_LocaleSELECT * FROM Report_Locale WHERE Text_Name = 'Λογ.Διαχ. – ΤÏ?.-Î*Ï?ουπ.-Διαφ.'Hopefully the Greek characters will display properly within this post,but the idea is basically to take the Greek text and build that into aquery. I can do the remainder later once I understand why this doesnot work as I expect. I realise my expectation is based on doingthings in English so I need to understand the differences. We've donethis for various other languages using other character sets, which iswhy I am puzzled.Any pointers ?ThanksRyan
View 1 Replies
View Related