|
I think your problem is outside the scope of this forum, and maybe of any forum here.
|
|
|
|
|
Have you tried getting a wrking query directly against the database without involving odbc?
When it works there inclue it in your asp page.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
as mentioned, the database is on AS/400 Mainframe server.
without odbc how can i chk the query.
can u guide me on how to proceed with this?
|
|
|
|
|
I feel really sorry for your employer, letting you lose with such equipment...
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
I have no idea about as400 database utilities, but every database I have ever come across has some utility to allow you to run queries. I suggest you speak to one of your colleagues and find out how to do it.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
|
Hi All!
I'm using the CSEXWB WebBrowser control in my application and I need to allow the javascript within it uninhibited access to the file system, everything works so far but I am presented with an annoying little dialog that says "An ActiveX control on this page may be unsafe to interact with other parts of the page. Do you wish to allow this interaction?"
How can I hide this dialog box and still allow the ActiveX control to be used anyway?
Thanks!
MrWolfy
|
|
|
|
|
I'm only using Visual C# 2008 Express Edition for a .NET Framework 2.0 project. So, I'm not able to use an assistent creating a connection to a MS SQL 2005 database on another server, it has to be done in code.
The table itself has a field which is automatically a primary key with autoincrement functionality.
Selecting all fields in the table are no problem with SqlConnection-, SqlDataAdapter etc. I'm also able to update an existing entry. My problem is inserting a new row. The new set is added to the table, but I'm not automatically getting back the new Primary Key value in the ID field (it's also not in the DataTable during debugging) . Next time, I'm editing this field, I'm getting an error, of course for updating it needs the new ID, the DataGridView-/ DataTable- Object doesn't know.
Probably it's very easy, but how can this ID can be updated in the DataGridView and let the dataset navigator of the grid stay at the current position (no reload with moving the navigator to the first set).
|
|
|
|
|
dj_jeff wrote: connection to a MS SQL 2005
dj_jeff wrote: The table itself has a field which is automatically a primary key with autoincrement functionality.
Microsoft cleverly hides that information in the documentation[^]
led mike
|
|
|
|
|
led mike wrote: Microsoft cleverly hides that information in the documentation[^]
I don't really know where I should handle this. Everything is controlled by the BindingNavigator and BindingSource. The document samples refer to a manual insert and console display.
Here's my current code of that Test form.
I guess Insert handling in RowsAdded- Event wouldn't be good because of running this event on building the datagridview.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace DummyProject
{
public partial class frmTest : Form
{
SqlDataAdapter dataAdapter;
DataTable table;
SqlCommandBuilder commandBuilder;
public frmTest()
{
InitializeComponent();
}
private void updateGridView()
{
this.Validate();
tblLangBindingSource.EndEdit();
dataAdapter.Update(table);
}
private void frmTest_Load(object sender, EventArgs e)
{
string strCon = "Data Source=MyServer;Initial Catalog=MyDB;User ID=MyUser;Password=MyPass;";
string strSQL = "select LangId AS ID, LangName AS Name FROM tbl_Lang";
dataAdapter = new SqlDataAdapter(strSQL, strCon);
commandBuilder = new SqlCommandBuilder(dataAdapter);
table = new DataTable();
table.Locale = System.Globalization.CultureInfo.InvariantCulture;
dataAdapter.Fill(table);
tblLangBindingSource.DataSource = table;
dataGridView1.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCellsExceptHeader);
dataGridView1.DataSource = tblLangBindingSource;
bindingNavigator1.BindingSource = tblLangBindingSource;
}
private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
this.updateGridView();
}
private void dataGridView1_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e)
{
this.updateGridView();
}
private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
{
this.updateGridView();
}
private void bindingNavigatorDeleteItem_Click(object sender, EventArgs e)
{
foreach(DataGridViewRow dgvr in dataGridView1.SelectedRows)
{
dataGridView1.Rows.RemoveAt(dgvr.Index);
}
this.updateGridView();
}
}
}
|
|
|
|
|
dj_jeff wrote: The document samples refer to a manual insert and console display.
The answers you seek are in the article, this of course requires you to read the article.
led mike
|
|
|
|
|
Seems to work with the InsertCommand attributes on UserAddedRow event. I'm getting back an autoincrement value in my grid and it seems to be stored always on the SQL table.
Why has this to be so complicated ? Microsoft's always dealing with it's features but can't make this handling easier.
|
|
|
|
|
dj_jeff wrote: but can't make this handling easier.
If you are looking for easy work, I suggest you choose a different career. The generally accept view, by uneducated people of software development, that it's easy and anyone can do it, is complete hogwash. It has always been complicated and there are no signs that will change in near future.
You might want to watch the video accessible from this web page.[^]
led mike
|
|
|
|
|
i have used backend as sqlserver, is it necessary that the client machine, where i'll be deploying my application that machine should have sqlserver installed in it. Otherwise, any prerequisites i should include while creating setup file.
|
|
|
|
|
praveenvkumarv wrote: is it necessary that the client machine
No!!!
Database should be in your server side. All client should store/Retreive data from Single Database Server. Isn't It.
|
|
|
|
|
my application is a windows application.
|
|
|
|
|
As far as I understand you've got a client/server application, where there is an SQL server on server side and some application on the client side. So, you've got two choices to deploy the app on the customer side:
1. Deploy the SQL server and the client application on the same machine, which in general is not a good idea,
2. Deploy your stuff on two separate machines - one for SQL, i.e. the server, and one (or several) machine(s) for the client application.
Regards,
Lev
|
|
|
|
|
i want to create a setup file. i used sqlserver 2005 as backend and c# as frontend.Now i want to create a setup file, i have created tables in sqlserver and creating setup file in vs 2005, how do the tables from sqlserver will be created when creating setup file in visual studio 2005 .
|
|
|
|
|
you can write your custom code for doing this things during installation of your application.
|
|
|
|
|
You can export the structure of your SQL DB to SQL queries (like CREATE TABLE) etc., and execute those queries during the first start of your application, after the install.
One tool to export the db structure is EMS Data Export for SQL Server link[^]. This is a part of EMS SQL Management Studio for SQL Server
|
|
|
|
|
Hi,
My app needs to write to the event log. It works fine on my machine (Windows XP) - I'm logged in with admin permissions. When I deploy to a Windows Server 2008 machine, it won't raise events because it says it can't find the specified source even though my code is supposed to create the source if it doesn't exist.
Any ideas?
|
|
|
|
|
For writing eventlog, create an applicationpool with rights as LocalSystem and assign this pool to site you have deployed.If still problem lemme know
Cheers!!
Brij
|
|
|
|
|
Brij wrote: create an applicationpool with rights as LocalSystem and assign this pool to site you have deployed
Brij, I beleive he is talking about windows application. So there is no concept of Application Pool.
|
|
|
|
|
hi every body!. please help me this question:
I used functions such as fillrectange, fillelipse,drawelipse ect..to draw on the picturebox. and now i want save it to change file of image: jpg, bmp... Thank you very much!
|
|
|
|
|
Hi,
try to use the Image-Property of the Picturebox:
<br />
PictureBox.Image.Save(...)<br />
Regards
Sebastian
|
|
|
|