here it iscan you please help me with my sql project. Problem is i have edit button and whenever i select a whole and edit it this change applies to all the date in my table.
is it a visual basic application that you are running?
please note that in a software you have different layers and parts.
the ui, which is the user interface (front end)
and the back end which is the behind of the scenes of the software / application
behind the back end, you have the database that holds the data, that's where the SQL comes in hand
what you are showing here is the ui, when clicking on the button, some code runs and queries the database and requests an update.
please share the code or the query itself and we are going to be able to help you.
a quick hint, when updating, you need to filter the relevant row for it to be updated; example :
update table
set [column = value]
where (filter)
if the filter is not set, all of the rows of that column will be updated.
Is it possible to export records from SQL directly to a drop down data validation list?
I want to export data directly to the list without having to actually have the data saved within a sheet/table etc.
Step 1: Add a query data connection
If you do not have an existing query data connection that you can use on your form template, follow these steps to add a secondary data connection to your form template that queries data. If your form template already has a secondary data connection that you can use, you can skip this section and go to Step 2: Configure the control.
On the Tools menu, click Data Connections.
In the Data Connections dialog box, click Add.
In the Data Connection Wizard, click Create a new connection to, click Receive data, and then click Next.
On the next page of the wizard, click Database (Microsoft SQL Server or Microsoft Office Access only), and then click Next.
On the next page of the wizard, click Select Database.
In the Select Data Source dialog box, click New Source.
On the next page of the wizard, in the What kind of data source do you want to connect to list, click Microsoft SQL Server and then click Next.
In the Server name box, type the name of the server that contains the SQL Server database.
Under Log on credentials, do one of the following:
If the database determines who has access based on the credentials used in a Microsoft Windows network, click Use Windows Authentication.
If the database determines who has access based on a specified user name and password that you get from the database administrator, click Use the following User Name and Password, and then type your user name and password in the User Name and Password boxes.
Click Next.
In the Select the database that contains the data you want list, click the name of the database that you want to use, click Connect to a specific table, click the name of the primary table, and then click Next.
On the next page of the wizard, in the File Name box, type a name for the file that stores the data connection information, and then click Finish to save these settings.
If you plan to use other tables in the query data connection, you can add the other tables in this page of the wizard.
Add other tables
Click Add Table.
In the Add Table or Query dialog box, click the name of the child table, and then click Next. InfoPath attempts to set the relationships by matching field names in both tables. If you do not want to use the suggested relationship, select the relationship, and then click Remove Relationship. To add a relationship, click Add Relationship. In the Add Relationship dialog box, click the name of each related field in the respective column, and then click OK.
Click Finish.
To add additional child tables, repeat these steps.
Click Next.
To store the results of the query with the form template, select the Store a copy of the data in the form template check box. Selecting this check box stores the query results in the form template. Becuase the data is stored in the form template. the data is available in the forms that users fill out, even if their computers are not connected to a network.
Security Note: Selecting this check box stores the query results in the form template. Because the data is stored in the form template, it is available in the forms that users fill out, even if their computers are not connected to a network. If you are getting sensitive data from this data connection, you may want to disable this feature to help protect the data in case the computer is lost or stolen.
Click Next.
On the next page of the wizard, type a descriptive name for this secondary data connection. If you want the form to automatically receive data when the form is opened, select the Automatically retrieve data when form is opened check box.
Step 2: Configure the control
If the form template has multiple views, click View name on the View menu to go to the view with the control where you want to display the data from the secondary data source.
Double-click the list box, drop-down list box, or combo box control that you want to populate.
Click the Data tab.
Under List box entries, click Look up values from an external data source.
In the Data Source list, click the data source that you want to use.
Click Select XPath Data Source button next to the Entries box.
In the Select a Field or Group dialog box, specify what data will be shown to the user and what data will be submitted to the external data source by doing one of the following.
Specify that the data the user will see is the same data the user will submit
Click a field, and then click OK.
Specify that the data the user will see is different from the data that the user will submit
Note: In this scenario, the data that the user will see is from one of the fields in the group, and the data that the user will submit is in another field in the same group.
Click a group, and then click OK.
In the Control Properties dialog box, click Select XPath Data Source button next to the Value box.
In the Select a Field or Group dialog box, click a field that contains the data that the user will submit to the external data source, and then click OK.
In the Control Properties dialog box, click Select XPath Data Source button next to the Display name box.
In the Select a Field or Group dialog box, click a field that contains the data that will appear in the control, and then click OK.
If the field in the Display name box has values with similar display names, and you want to display only unique names, select the Show only entries with unique display names check box.
I am trying to use the current versions of SQL Server Management Studio with Microsoft SQL Server Express (64-bit) to create a Stored procedure.
I’m following the https://msdn.microsoft.com/en-us/library/ms345415.aspx guideline.
When I get to step 3 and right-click on “Stored Procedures” the popup menu I am presented with does not include the “New Stored Procedure” option. Instead, at the top of the list of options that are presented is the option “Stored procedure…” When I click on this I get the ASCI text block “Template Generated from Template Explorer” displayed.
What I was expecting was that the “Specify Values for Template Parameters” Query Editor Pane would have been displayed and that the data I entered into it would have been reflected in the “Template generated from Template Explorer” text block which would have been displayed next.
Can anyone tell me why the “Specify Values for Template Parameters” Query Editor Pane isn’t being displayed?
You can call that dialog by using the key combination Ctrl-Shift-M.
Most likely they are not showing this dialog automatically anymore, in order to let the user change the script first and then call the dialog when ready.
New query tab in CTRL+K,CTRL+X, you can use the combination.
I have Visual Studio 2012 Express and have a razor c#.net project set up.
I have right clicked on AppData and added a Microsoft SQL database
Now I can see that it is there, I goto the Database Explorer and right click on Tables and click add table.
The table designer comes up and I make a few columns making sure "Id" remains primary key.
There is a table properties panel which I can't edit the name in as it is greyed out?
When I save the table it makes me choose the location for the file, what file is this? The table or the database???
If I save the SQL file in the app data part, It doesn't appear under the Tables folder any way.
Instead of saving the table, we should use update option. It will available at left hand top corner of table design view.
Refer above screenshot which highlighted the update.
I have Visual Studio 2012 Express and have a razor c#.net project set up.
I have right clicked on AppData and added a Microsoft SQL database and named it "EspressoCoffees"
Now I can see that it is there, I goto the Database Explorer and right click on Tables and click add table.
The table designer comes up and I make a few columns making sure "Id" remains primary key.
Where on earth do I name the table? There is a table properties panel which I can't edit the name in as it is greyed out?
When I save the table it makes me choose the location for the file, what file is this? The table or the database???
If I save the SQL file in the app data part... It doesn't appear under the Tables folder any way.
Just modify the name of the table in the generated T-SQL and click on the "Update" button (int the top-left corner of the tab).
After you click update, close the design tab and hit refresh on the server explorer.
Without creating the table use Queries to create the table
Update table in T-SQL .
Simple as that ....