w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Devexpress GridControl row backcolor
Try GridView_RowStyle event to change a row's background color http://documentation.devexpress.com/#windowsforms/DevExpressXtraGridViewsGridGridView_RowStyletopic gridView1.RowStyle += gridView1_RowStyle; private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e) { GridView view = sender as GridView; if(e.RowHandle >= 0) { bool isRed = Convert.ToBoolean(view.GetRowCellDisplayText(e.RowHandle, view.Columns["Category"])); if(isRed) { e.Appearance.BackColor = Color.Red; } } }

Categories : C#

change column to row in gridcontrol wpf devexpress
Devex has a vertical grid that does exactly that but sadly it is not available for WPF but only for WinForms. This link shows an example of how to show a grid that will resemble the WinForms VerticalGrid control. This link is to a question on the Devex site that sounds similar to yours. Maybe you'll find an answer there. Hope that helps :)

Categories : Wpf

Checkbox is not checked in DevExpress GridControl using wpf
First of all you need to correct the binding inside the CellTemplate: <CheckBox IsChecked="{Binding Path=RowData.Row.IsValid}"/> Second, your data items should implement INotifyPropertyChanged: public class ss:INotifyPropertyChanged { private bool _isValid; private string _evenOdd; public bool IsValid { get { return _isValid; } set { _isValid = value; OnPropertyChanged("IsValid"); } } public string EvenOdd { get { return _evenOdd; } set { _evenOdd = value; OnPropertyChanged("EvenOdd"); } } public event PropertyChangedEventHandler PropertyChange

Categories : Wpf

How to get DevExpress GridControl cell single click event in wpf?
I think you should look at the HitInfo class. Try this link. GridHitInfo hitInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y)); if(hitInfo.InRowCell){ object value = View.GetRowCellValue(hitInfo.RowHandle, hitInfo.Column); //... }

Categories : Wpf

How to move rows up/down on button press in devexpress gridcontrol using c#
To identify the focused row by its handle you can use the GridView.FocusedRowHandle property. Please review the Identifying Rows and Cards article for more details. For moving row focus within the gridview from code-behind I suggest you use a special methods described in the Moving Row Focus help-article: void btnFocusNextRow_Click(object sender, EventArgs e) { gridView1.MoveNext(); }

Categories : C#

Devexpress( WPF GridControl) modify image inside a GridColumn using DataTrigger
Try accessing you images like this: <Style TargetType="{x:Type Image}" x:Key="ImageStatusStyle"> <Style.Triggers> <Setter Property="Source" Value="/ApplicationName;component/Icons/StatusOk.png" /> <DataTrigger Binding="{Binding Path=Data.SaveStatus, UpdateSourceTrigger= PropertyChanged}" Value="{x:Static enums:SaveState.DoneUnsuccesfuly}"> <Setter Property="Source" Value="/ApplicationName;component/Icons/StatusError.png" /> </DataTrigger> </Style.Triggers> </Style>

Categories : Wpf

How to get the dynamically column index while clicking on a cell using wpf GridControl DevExpress?
You can identify clicked column and this column visible index using the hit-information returned by the GridView.CalcHitInfo() method: GridHitInfo hitInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y)); if(hitInfo.InRowCell){ int columnIndex = hitInfo.Column.VisibleIndex; //... } Related help-article: Hit Information Overview Related How-To: Identify the Grid's Element Located Under the Mouse Cursor

Categories : Wpf

Post data to Ms access Database file from GridControl
Make sure that the grid control has saved all the changes made to the currently focused row. In this instance, you should call the DataViewBase.CommitEditing method. Then use the Update() method on your data adapter. Related examples: How to: Posting Data to a Connected Database How to: Post Values to the DXGrid Data Source Immediately After Changing a Cell Value

Categories : Wpf

Oracle Forms 10g - why do I have to click save so that my insert query will save to database
Oracle Forms provides a great deal of functionality for you so that you don't have to write it. For example, if you base a block on a table, and if the user enters data and clicks "Save", Oracle Forms knows whether to execute Insert, Update or Delete statements appropriately followed by a Commit. In your case, you have ignored that functionality and have hardcoded an Insert and Commit in your button code. Therefore, the user does not have to click the Save button, because the data has already been "saved" by your Add button.

Categories : Oracle

Is it possible to import the data from Oracle Database 7 to Oracle Database 11g?
11g should be able to import a dumpfile generated from version 7. I have not tried this, but Oracle claims that the 11g imp utility can work with Oracle versions that are 28 years old! See support document 132904.1 for all the details. It claims that "Import can read export dump files created by Export release 5.1.22 and higher (up to same version)." And it even includes an example of exporting from 7.3.4 into 11.1.0. Run the version 7 exp program to create a dump file, and use the 11g imp program to import the data. For 11g, the imp and exp utilities are included with the default install and can be called from the command line. I assume your version 7 install has an exp program somewhere. Those utilities can be scheduled with the relevant operating system utilities.

Categories : PHP

how to connect MS Access database with matlab (transfer data from GUI and save in database )
You need to run SQL queries on the database; you can do this with database.fetch (and a few other friends). The example query from the docs: conn = database('dbtoolboxdemo','',''); setdbprefs('DataReturnFormat','cellarray') results = fetch(conn, 'select productdescription from producttable') % Not in the example in the docs: this syntax, which I prefer, is also supported results = conn.fetch('select productdescription from producttable'); Note that you will also need to know how to write SQL. For that, there are plenty of resources online - you just have to search for them.

Categories : Database

how can communicate two SQL database in LAN to save data in both database
Which database engine are you using? There're several ways to build a distributed/replicated database, I'm sure you'll find out how to do it by reading your engine documentation, but we cannot help here without more info.

Categories : SQL

how to fetch data from oracle database using PHP
The reasons why you are keep getting a blank page are: 1. $this -> totalRows = oci_num_rows($this -> statement); oci_num_rows() function does not return the number of selected rows as you might think. It returns number of rows affected by some DML statement(except SELECT statement). So in your case it will always return 0 and as a result of it the condition 2. if($this -> totalRows > 0) evaluates to false and while loop will never be executed. Besides, oci_fetch_array() fetches one row at a time or FALSE if there is no more rows to return, so if($this -> totalRows > 0) in your case seems redundant.

Categories : PHP

Oracle 11g Script database with data
To extract metadata and data you should look at data pump, specifically the export and import tools. This will be the simplest, fastest and most supported way to move everything. You will need to already have created the database, but I'm not sure if you're confusing that with the Oracle schema. Which you will also have to create in advance by creating the user(s) that will own all the objects. You can extract a script to create the user/schema, e.g. from Toad or SQL Developer, or using the DBMS_METADATA package. Most client applications also have options to export pretty much everything as scripts. In SQL Developer, for example, go to the Tools menu and there's an 'Export database' option where you can choose what you want to include, which will be pretty much everything in your case. Y

Categories : SQL

Copy data from one oracle database to another with Python
Yes, you can have multiple connections open at the same time. Take care of each connection and cursor, of course. You can find useful CX-OracleTools, a collection of scripts based on cx_oracle for working with Oracle databases. There is a CopyData script very interesting.

Categories : Python

Moving Data from DataSet to Oracle Database using C#
You are looping columns but adding the drRow[i] as values in the parameters. I do not think this is what you intended. skip the columns loop and add the first column value to id and second column value to data. that should be what you wanted.... if not then describe a bit more...

Categories : C#

Copy (Import) Data from Oracle Database To Another
You might want to consider using a database link from database A to database B. You can query the data from database B to insert into your database A tables. You are free to query whatever you want using SQL or PL/SQL. More on database links: http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_5005.htm

Categories : SQL

How can I save my form data into the database
The form is in the $form variable. When you first run the controller, you're probably in the GET mode and you construct the $form with a new Familia. On the second call, after doing a POST in the twig, you'll bind the request data (the $petition) to the $form, which is then validated and if everything is ok, you persist the $familia using doctrine entity manager. What you have is the typical controller that is explained quite well in the symfony books: http://symfony.com/doc/current/book/forms.html Carefully read the symfony book http://symfony.com/doc/current/book/index.html I know that is quite a literature to read, but it pays well since is extremely well described.

Categories : PHP

Save jpg data from database to a jpg file
You can use MemoryStream object in C# as below MemoryStream memstmSignature = new MemoryStream(InkToBytes(ds.Tables[1].Rows[0]["SIGNATURE"].ToString(), "image/gif", 0, 0)); Image imaSig = Image.FromStream(memstmSignature); imaSig.RotateFlip(RotateFlipType.Rotate180FlipX); imaSig.Save(Path.Combine(this.temporaryFilePath, this.signatureFileName)); memstmSignature.Close(); Helper functions below private static byte[] InkToBytes(string inkStrokes, string encoderType, float x, float y) { ArrayList strokes = new ArrayList(); // max size for bit map int maxX = 0; int maxY = 0; // intialize the strokes array with text string int strokesCount; if (inkStrokes.Length > 0) { if (inkStrokes.EndsWith(

Categories : Sql Server

Save data instead of adding to database
I'm afraid you'll need to get article again from database, update it and save changes. Entity framework automatically tracks changes to entites so in your repository should be: public void EditArticle(Item article) { var dbArticle = entities.items.FirstOrDefault(x => x.Id == article.Id); dbArticle.item_title = article.item_title; //and so on //this is what you call at the end entities.SaveChanges(); }

Categories : Asp Net

How to copy data from one database/table to another database/table in oracle using toad
copy is a SQL*Plus command, not a SQL statement. I would be surprised if Toad had implemented that particular SQL*Plus command (it does implement many of the simpler commands). If you want to use the copy command, you would need to use SQL*Plus, not Toad. If you want to use Toad, you would need to use a SQL statement to copy the data. You could create a database link in the destination database that points to the source database and then INSERT INTO tool_service_mapping SELECT * FROM tool_service_mapping@<<db link to source database>>

Categories : Oracle

java- How to display data from 2 tables in Netbeans from ORACLE database
Problem is in your SQL Query; ResultSet rs1=select.executeQuery("select * from narocnik,prevoz"); If you want to join two tables you should use joining like inner join, left join, right join or outer join. But when you just use comma (,) in your query to join two tables it will be outer join. It will give you multiple result; User Inner Join like - Select * from table1 inner join table2 on table1.id = table2.id; Hope it will work for you.

Categories : Java

I want to fetch multiple data from oracle database and want to store it into another variables in C# .net
Not sure that this would be the root of the issue, but this might be giving you some weird data from your SQL query: Did you mean OC.CITY AS discm instead of OC.CITY discm? Also, just a suggestions that you might want to specify a type for the columns of your datatable: dtbl.Columns.Add("accid", typeof(int)); dtbl.Columns.Add("srno", typeof(int)); dtbl.Columns.Add("names", typeof(string)); etc.

Categories : C#

Save data in database automatically at particular time
Use a ScheduledExecutorService. Calculate the delay until the save date (using Calendar) and .schedule() your Runnable, which will save the data. You will probably want to use a Executors.newSingleThreadScheduledExecutor(). Side note: please use a prepared statement and not string concatenation to generate your SQL query! The JDK has all it takes to do so, there is no reason not to use it.

Categories : Java

How to save edited JTable data to database?
As you are using DefaultTableModel you have to register a listener to that model a TableModelListener listening for changes. How to use TableModelListener Example: myTable.getModel().addTableModelListener(new TableModelListener(){ @Override public void tableChanged(TableModelEvent evt){ //code here } });

Categories : Java

Read Email and save data to database in PHP
If the problem really is only parsing, in this case I would recommend simple regex. However what I do recommend is using named patterns, so you dont confuse the indexes and maby have wrong matches. Here is a quick example: $str = <<<body Name: xyz Zip: 33402 body; if(preg_match('/(?P<name>w+): (?P<zip>d+)/', $str, $matches)) { print_r($matches); // db beeing your database connector, for example pdo $sql = "INSERT INTO mytable (name,zip) VALUES(".$db->quote($matches['name']).",".$db->quote($matches['zip']); echo $sql; } else { //mail does not correspond to pattern! } If your mail gets longer, use preg_match several times. Possibly for each field you want to parse separately. Because writing a huge regex if you have more fields is very

Categories : PHP

How to save data in database through dynamic controls
If you are creating dynamic controls, you need to make sure you recreate them on a post back. This needs to be done before viewstate and events are wired up. The best place to create the controls is during the Page_Init function, no the Page_Load. Look into ASP.Net Page Life Cycle to see how a page gets build.

Categories : Asp Net

How to get all the data from form at once and save in database in Django?
Let's imagine you've a Django model form class (you cannot save in DB directly a simple form since there is no corresponding schema, but you can with a model form) class MyForm(forms.ModelForm): field1 = forms.IntegerField(...) ... You rendered it in a template with {{ form.as_p }} Then in the reception view, do the following: def myview(request): if request.method == "POST": form = MyForm(request.POST) if form.is_valid(): form.save() # here you save the form all at once else: ... # here return the "form" to the template, and render it with form.as_p: it will display the validation errors else: ... # here treat the get request. If not get: return an Http 404 response

Categories : Django

Oracle Forms 6i: How to manually insert record to database from data block
First of all, if you only need to fill the max_id then you should better use a pre-insert trigger to fill the field. And let oracle forms take care of the insert. Second, you forgot a commit at the end.

Categories : Oracle

Extract BLOB data from Oracle Database and convert to original file
The problem is with this line: l_file := UTL_FILE.fopen('IRB','STD_FlipBook_Religion2013.doc','wb','W'); The docs show the signature of the function below. The last parameter you have, 'W', corresponds to the 'max_linesize', which is expected to be a number. So, you cannot convert 'W' to a number. I think you can simply use the default value in your case, so just remove the 'W' parameter. (from Oracle 9.2 docs) FOPEN Function This function opens a file. You can specify the maximum line size and have a maximum of 50 files open simultaneously. See also "FOPEN_NCHAR Function". Syntax UTL_FILE.FOPEN ( location IN VARCHAR2, filename IN VARCHAR2, open_mode IN VARCHAR2, max_linesize IN BINARY_INTEGER) RETURN file_type; Parameters Table 95-3 FOPEN Function Param

Categories : Oracle

Floating point precision issue when passing data between C++ and Oracle database
You may not have control over the client but can you change the interface? Passing a floating point to Oracle will inevitable cause this problem, because they are an inherently imprecise datatype. But if you can amend the interface you could pass two integers to Oracle: the AMOUNT's integer and the AMOUNT's fractional part. Oracle can then combine these two integers to make a single NUMBER variable which it can use happily. Since I wrote this you have edited your question, and as Oli points out, this suggestion is no longer valid. What can you do instead? Fake it in the Oracle layer by enforcing a decimal precision there. That may create a few rounding errors but much fewer than you have now. Although it won't solve the problem with large whole numbers. Raise this as a bug

Categories : C++

Flask - Save session data in database like using cookies
You should check out Flask-KVSession, which is self-described as a drop-in replacement for Flask‘s signed cookie-based session management. Instead of storing data on the client, only a securely generated ID is stored on the client, while the actual session data resides on the server. Which basically describes traditional server-side sessions. Note that it supports multiple database backends: Flask-KVSession uses the simplekv package for storing session data on a variety of backends. See the Example Use for an example of what to import and how to configure it.

Categories : Database

How to Edit & Save ViewModels data back to database
First of all, it's really good that you are using ViewModels but for this particular case, it's probably not necessary, your Create view could look like this: @model MvcApplication1.Models.Doctor //other fields here <div class="editor-label"> @Html.LabelFor(model => model.DoctorAddress.Address) </div> <div class="editor-field"> @Html.EditorFor(model => model.DoctorAddress.Address) @Html.ValidationMessageFor(model => model.DoctorAddress.Address) </div> <div class="editor-label"> @Html.LabelFor(model => model.DoctorCharge.IPDCharge) </div> <div class="editor-field"> @Html.EditorFor(model => model.DoctorCharge.IPDCharge) @Html.ValidationMessageFor(model => mo

Categories : Asp Net Mvc

saving data in cookies to save trips to database
Definitely an interesting approach. With this cookies plugin, if you don't specify the expire, your cookie will only stay for the length of the session. So you can simply do: $.cookie("basket-data", JSON.stringify($("#ArticlesHolder").data())); And it will stay for this session only. Just for the record - session storage is definitely a better choice than cookies.

Categories : Jquery

Save view state data into database Error
When you are saving into the database, you redirect right after each insert. Hence, none of the subsequent inserts are executed. I would move the redirect out of the loop. Maybe you can pass the number of records inserted in the query string as well. protected void Button2_Click(object sender, EventArgs e) { foreach (GridViewRow oItem in GridView1.Rows) { string str1 = oItem.Cells[0].Text; string str2 = oItem.Cells[1].Text; string str3 = oItem.Cells[2].Text; insertData(str1, str2, str3); } Response.Redirect("WebForm1.aspx?stat=insert"); } public void insertData(string str1,string str2,string str3) { SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["CIMProRPT01ConnectionString"].Conn

Categories : Asp Net

save dynamically created controls data in database asp.net mvc
Try this: [HttpPost] public ActionResult Create(List<StudentAdditionalDetail> additionalFields) { ads.AddAdditionalDetails(additionalFields);//calls the insert method return RedirectToAction("Index"); }

Categories : C#

How to save the data to database through dynamically loaded controls
in the database vision you need a table with at least 3 columns, first a VARBINARY column that is called BLOB column to store your file, second a VARCHAR column to store your file extension (e.g .gif, .jpeg) , third a VARCHAR or NVARCHAR column to store your caption. but the point is in your application you need to convert your file into array of bytes then pass it to sql server as varbinary parameter. private Byte[] getDocumentFormatter(string path) { FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); BinaryReader br = new BinaryReader(fs); Byte[] bytes = br.ReadBytes((Int32)fs.Length); br.Close(); fs.Close(); return bytes; } but in web environment you can replace path with your

Categories : C#

How to save and retrieve data from sdcard or database in android?
Have a look at SharedPreferences or if you plan to store more data try a SQLite database. Here is the tutorial to store files in Android.

Categories : Android

save data to database with click of button/link
If I understood correctly, you need to add button onClick event handler? If so, here you go (using jquery 1.9+): $(document).ready(function() { //onClick event handler for button with id "btn_save" $(document).on("click","#btn_save",function() { //Your code here }); });

Categories : PHP

Xml data Node values need to save into Database table
You can easily extract the information from the <Computer> node and insert it into Asset: (PS: Note: it's a processor - not a "processior" (no i after the two s) ) DECLARE @Input XML SET @Input = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Computer Name="WH7" Processor="Intel(R) Core(TM)2 Duo CPU P9600 @ 2.66GHz" Manufacturer="Dell Inc." Model="Latitude E6500" Domain="WORKGROUP" RAM="3536 MB" ServiceTag="DGQKTJ1"> <BIOS Manufacturer="Dell Inc." Version="Phoenix ROM BIOS PLUS Version 1.10 A19"/> </Computer>' INSERT INTO dbo.Asset(Name, Processor, Manufacturer, Model, Domain, RAM, ServiceTag) SELECT Name = @Input.value('(/Computer/@Name)[1]', 'varchar(50)'), Processor = @Input.value('(/Computer/@Proc

Categories : Xml



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.