|
hi
i need code 4 currency convertor
automatic convert the currency
4 payment in online hotel reservation
thanx
viren
|
|
|
|
|
virendra kumar wrote:
i need code 4 currency convertor
It is a simple multiplication or division. Also, this question does not seem to have anything to do with databases.
Source currency * or / exchange rate = destination currency.
e.g. Pounds Sterling to US Dollars. Exchange rate: £1 == $1.87
£5 * 1.87 = $9.35
or US Dollars to Pounds Sterling
$10 / 1.87 = £5.34
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
virendra kumar wrote:
online hotel reservation
Maybe you need this.[^]
<italic>Work hard, Work effectively.
|
|
|
|
|
|
In my database i got:
ID, Name, Type, Comment
But when i fill to grid. my Columns reorder:
Comment, ID, Name, Type
But i want to have an ordier like in database. How can be done.
I used the tutorial on web:
http://www.c-sharpcorner.com/Tutorials/OleDbDataAdapterDesign.asp
I am using Jet 4.0 as connection
I have noticed if i change select statment, but there isn't any effect.
I hope i dit posted this on correct forum.
Can anybody help me. Thanks in advance.
|
|
|
|
|
I think the problem is in your grid. How do you fill the grid?
<italic>Work hard, Work effectively.
|
|
|
|
|
dgCDList->DataSource = core->databaseDataSet->CD;
core->oleDbCDData->Fill(core->databaseDataSet);
|
|
|
|
|
I need to set up a mail account for reporting services in SQL 2k
can anyone point me to some information
Thanks Paul
|
|
|
|
|
Hi all,
I would be most grateful of some help !!!!
I have a number of Text boxes (including a rich text box) and I simply want to insert the data into an access DB.
I have made a ADO.net connection, adapter and then it has generated a dataset (using GUI not code). I can display the data but just can’t find a good explanation of the statement needed to insert into DB
Any Help would be fantastic !!!!
Thanks
Martin
|
|
|
|
|
|
Hi,
Sorry to bother you but i am unfamiliar with C# and am still having big difficulty.
I need a very basic step by step help.
Would be most grateful
Thanks
Martin
|
|
|
|
|
C# uses the .NET framework, as does VB.NET. The API calls will be the same. Perhaps if you could break down exactly what you're finding hard - do you know anything about SQL to start with ? Do you know anything about how ADO.NET works ? Did you know how to bind a data source to a data grid, or did you copy the code from somewhere ?
If I have an idea of your skill level, and what bits you're struggling with, perhaps I can be more specific.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I have no SQL experience !
I know the basics of ADO.NET i.e. create a connection adapter and dataset this can then be used to bind to datagrid, listbox ...
However i have no idea about how to work with connections.
Thanks for all your help !
Martin
|
|
|
|
|
Try this[^] as an intro into the overall code you need, and the SQL Insert page I linked you to before for info on the Insert statement generally. So long as you have a database already that expects the values you want to write, you should be fine. Make sure you're providing a value for each column in the row you're creating, unless a default value exists.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hye There
I have created one user in SQL Server and it has rights in two different databases at a time. Now I want to script the user. the option available is to script with in database by right clicking on the database then script. I want to scrip the user to get rights on all the databases togather.
Any Comments
|
|
|
|
|
|
Hi All,
When bound datagrid to some table, edit a cell in a row and press SAVE button(on my toolbar) to update it. it doesn't update the row being edited, until we focus on row below it or above it.
Regards,
sorry for my bad English.
|
|
|
|
|
hi, i have a code works with oracle sql i want to change the problem in it that doesn't work with sql2000 soplease any one help me
the sql statement is:
select folderindex, NAME, PARENTFOLDERINDEX from pdbfolder
connect by prior FOLDERINDEX=PARENTFOLDERINDEX
start with PARENTFOLDERINDEX = " + indexx + "
order by(PARENTFOLDERINDEX)
it gives me an error on line to when i test it on the sql 2000 query analyzer so what is the solution :->
Thanks alot
Mohammad Daba'an
|
|
|
|
|
Hi,
Anybody knows if it's better in an application to do a "for {}" statement and so segment, for example, 30000 results in 1500 parts (+ or - don't mind, it's the idea) to do an sql insert or doing a unique process witch treat all the results ??
for example
for (int myI = 0; myI < 30000; myI += 1500)
{
here storedprocedure in wich i take items between myI and myI +1500) and so use a portion of these items
...
SqlDataReader dr = MaCommande.ExecuteReader(CommandBehavior.CloseConnection);
(1500 items are read)
while ( dr.Read()) {process action}
}
or directy use all results classically (stored procedure without between)
...
SqlDataReader dr = MaCommande.ExecuteReader(CommandBehavior.CloseConnection);
(30000 items are read)
while ( dr.Read()) {process action}
Witch solution is better ?
Thanks for your reply
Christophe
Christophe
|
|
|
|
|
|
thank you very much Colin
Christophe
|
|
|
|
|
I am trying to access a database from a client and am getting access errors. I have it working on the server. The server is setup to trust the assembly via a strong key.
I don't want to setup each client to trust the assebly so I am trying to use SqlClientPermission.Assert but it does not seem to be working.
Any ideas? Thanks in advance.
Here is the code
SqlClientPermission sqlClientPerm = new SqlClientPermission(PermissionState.Unrestricted);
sqlClientPerm.Assert();
string strSql;
string myConnectString = "Persist Security Info=False;Integrated Security=true;database=myDataBase;server=xx.xxx.xxx.xx;Connect Timeout=10";
strSql = "UPDATE tblText SET Text = '";
strSql += tbText.Text;
strSql += "' WHERE TextID = 1";
// Set the query
SqlCommand sqlCmd = new SqlCommand(strSql);
// Get the connection
sqlCmd.Connection = new SqlConnection(myConnectString);
sqlCmd.CommandType = CommandType.Text;
// Open the database
if ( sqlCmd.Connection.State == ConnectionState.Closed )
{
sqlCmd.Connection.Open();
}
// Do the query
sqlCmd.ExecuteNonQuery();
SqlClientPermission.RevertAssert();
|
|
|
|
|
Hi,
I am working on VB.NET Windows form application. I am using Data Binding feature of .NET. I have one problem as described below:
There are two table call “Overheads” and “OverheadDistribution”.
OverheadID is Primary Key for Overheads and FK for Overheads.
There is a Master-Detail Win Form where OverheadDistribution is shown in Datagrid as part of Detail part for selected Master (Overhead).
When I fetch data from Data source in DataSet. I make a DataRelation using OverheadId and assign this DataRelation to Datagrid as DataSource.
There are ten numbers of records in OverheadDistribution and for OverheadID=1, there are two records (OverheadDistributionID = 3,5). So, there are two rows in Datagrid.
When I want to delete a row from Datagrid, I select a row in Datagrid, get Row index using CurrentRowIndex, let assume I select row no 2 means actually fifth row in datatable (“OverheadDistribution”).
So, How can I find corresponding row of Datagrid in Datatable? Means, by clicking on Datagrid row, how can I find respective row in DataTable?
Regards,
|
|
|
|
|
Hi there! Over the past few years I've worked on a number of websites. I've implemented a Search with varying conditions many times, but now it's different. So far the Search used stored procedures and dynamic SQL:
DECLARE @select_fields NVARCHAR(1024)
DECLARE @where_clause NVARCHAR(4000)
DECLARE @join_clause NVARCHAR(2048)
DECLARE @query NVARCHAR(4000)
SET @select_fields = '...'
SET @join_clause = ''
SET @where_clause = ' WHERE 1 = 1'
...
IF @in_field1 IS NOT NULL
SET @where_clause = @where_clause + ' AND [table1].[field1] = @in_field1'
IF @in_field2 IS NOT NULL
SET @where_clause = @where_clause + ' AND [table2].[field2] = @in_field2'
...
SET @query = 'SELECT' + @select_fields + ' FROM [table1] AS [t1]' + @join_clause + @where_clause
DECLARE @params_def NVARCHAR(1024)
SET @params_def = '@in_field1 TYPE, @in_field2 TYPE, ...'
EXEC sp_executesql @query, @params_def,
@in_field1 TYPE,
@in_field2,
... But now I'm facing an application that is requiring an advanced search with about 35-40 conditions, some of them arrays. I can't use the code above, because the @query variable is only 4000 characters long. As you can imagine, 35-40 conditions won't fit in it . What is the best way to implement this Search using stored procedures? I don't want to build the SQL code in the program code and pass it to the stored procedure. Thank you. Stanimir.
|
|
|
|
|
What if you passed the conditions in as an XML document, used that to build a table and then did your query against the values in the table ( which would have one row ) ? I believe you can pass in a text field greater than 4000 chars ?
Christian Graus - Microsoft MVP - C++
|
|
|
|