|
Hi, I finished the Web project in my system. I want to test it in another system. How to copy the database to that system with stored procedures? Can anyone guide?
|
|
|
|
|
You don't need to, you can just point to your current machine and point to it over the network. But, why do you want to test another machine;s ability to host it ? Shouldn't you be testing different browsers, not different hosts ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
He need my project for studying. And there s no net connection in his house. So i have to copy my database to there. Can u give a idea?
|
|
|
|
|
Take Backup of your Database and Restore that in his System.
|
|
|
|
|
Can u explain how to take backup and restore? I dont know it.
|
|
|
|
|
Ideally, you'd create a DB as a series of scripts that can be run to recreate the DB. IF you didn't do this, then, as someone else said, if it's SQL Server, you need to backup and restore it. ASsuming you have access to client tools.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Can u explain how to take backup and restore? I dont know it. I am new to Dot net and Sql
|
|
|
|
|
No, I really can't, because you've not given me enough information. What database are you using ? Is your database an mdb file, is it SQL Server, or is it SQL Server Express ? Or something else ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I am using db of SQlserver 7.
|
|
|
|
|
OK. I would recommend buying a book on databases and reading it, and also becoming familiar with the help files that come with SQL Server ( typing 'backup database' into those is the best way to answer this question ).
Right click on the DB and choose backup. Then give the backup to your friend, and he will restore it into his instance of SQL Server.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello All,
I want to implement following functionality in my project. Could you please tell me which sms gateway are available which provide following service.
- Suppose a user of my website currently in Chicago then at that time i a displaying his status on my webiste
i.e xyz checked in Chicago 10 min ago.
- A another user which is friend of user xyz is checked in other part of chicago
or any where then at that time xyz user should get a message
pqr checked in "His location".
Which sms gateway will send automated message like this by checking location of user and i want to integrate them with my website.
EX- brightkite.com
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
The site you refer to has a developer API. I assume that they are requiring the people you're tracking to run their app on the phone, and the phone would need to have GPS. How on earth would an SMS gateway keep track of where people are ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Yes the phone need to have a GPS.
Every phone has an option "Cell Info Display" which tell us the location where we are.
By using this we know the current status of user.
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Hello frnds,
I havestucked into a problem. I am unable to delete multiple rows directly from the gridview ie without any interaction with the database. Please help me out. What I have done is like this.
1 protected void BtnDelete_Click(object sender, EventArgs e)
2 {
3 try
4 {
5 dt = (DataTable)Session["Cart"];
6 CheckBox chkSelected = new CheckBox();
7 foreach (GridViewRow rowItem in GridView1.Rows)
8 {
9 chkSelected = (CheckBox)rowItem.FindControl("chkSelection");
10 index = rowItem.RowIndex;
11
12 if (chkSelected.Checked == true)
13 {
14 dt.Rows.RemoveAt(index);
15 dt.AcceptChanges();
16 }
17 }
18 GridView1.DataSource = dt;
19 GridView1.DataBind();
20 Session["Cart"] = dt;
21 }
22 catch(Exception ee)
23 {
24 Lblmsg.Text = ee.Message;
25 }
26
27
28 }
This code is working fine If I delete only one row. But suppose I have 3 rows in the gridview and I checked all the three, then it will give an error that "there is no item at position 2". That means after deleting ,the datatable is not refresing its index.
please help me.
cheers
sneha
cheers,
sneha
|
|
|
|
|
You are getting the row index from the gridview, but you're manipulating the rows in the session data table. As a result, as soon as you remove one item, the number of rows is no longer the same, nor will the indexes be the same.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks Sir. I was making that silly mistake.
Thank you very much.
cheers,
sneha
|
|
|
|
|
Hi Sneha,
You can delete by getting the rowID. After gettin the rowID, you can run code which you have written.
hope this will help
Regards
Ravi
|
|
|
|
|
Hi ,
i want to insert null for date,when i do this database is taking date as 1900-01-01 , i want it to be blank , i am doing, add and edit pages,when i retrive data while editing date is coming as 1900-01-01 , help me resolving this.
cancellation_date date,
i am using syabase as database,
|
|
|
|
|
Well, does your column accept nulls ? It doesn't sound like it, it sounds like somewhere, the code or the database is inserting a default value.
This has nothing to do with ASP.NET.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks for the reply,
the column accept nulls , through code i am not inserting any default values , how to stop databse inserting default values.
|
|
|
|
|
Impossible for me to say, because, again, you're not showing me any code. You either have a default value for the column which is being inserted for some reason, or there's something wrong with the code that is doing the inserting. I'd start in the database manager for your DB, and do some inserts into that table from there, and see what happens, to see if the problem is your DB code or your .NET code.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi my code
OdbcCommand cmd = new OdbcCommand("{call InsertRetailer(" + Convert.ToInt32(txtRetailerId.Text) + ",'" + txtRetailerName.Text + "','" + txtAppointedDate.Text + "'," + ddlStatus.SelectedValue + ",'" + txtCancellationDate.Text + "'," + ddlRegion.SelectedValue + "," + txtCreditLimit.Text + ",'" + txtContactPerson.Text + "','" + txtAddress1.Text + "','" + txtAddress2.Text + "'," + ddlState.SelectedValue + ",'" + txtPostcode.Text + "','" + txtTelephone.Text + "','" + txtMobile.Text + "','" + txtFax.Text + "','" + txtEmail.Text + "'," + ddlDistributor.SelectedValue + ",'" + txtTaxId.Text + "'," + sell + "," + cancel + "," + pay + "," + ddlSchemeId.SelectedValue + ",'" + txtBankNumber.Text + "','" + txtBranchNumber.Text + "','" + txtBankAccountNo.Text + "')}", Conn);
create procedure InsertRetailer
@retailer_id numeric=null,
@name varchar(1000)=null,
@appoint_date NVARCHAR(20),
@status_id numeric=null,
@cancellation_date NVARCHAR(20),
@region_id numeric=null,
@credit_limit numeric(22,2)=null,
@contact_name varchar(1000)=null,
@addr1 varchar(1000)=null,
@addr2 varchar(1000)=null,
@state_id numeric=null,
@pincode varchar(1000)=null,
@telephone varchar(1000)=null,
@mobile varchar(1000)=null,
@fax varchar(1000)=null,
@email varchar(1000)=null,
@distributor_id numeric=null,
@tax_id varchar(1000)=null,
@sell_enable numeric=null,
@cancel_enable numeric=null,
@pay_enable numeric=null,
@scheme_id numeric=null,
@bank_number varchar(1000)=null,
@branch_number varchar(1000)=null,
@bank_acct_number varchar(1000)=null
as
begin
insert into retailer(retailer_id,name,appoint_date,status_id,cancellation_date,region_id,credit_limit,contact_name,addr1,addr2,state_id,pincode,telephone,mobile,fax,email,distributor_id,tax_id,sell_enable,cancel_enable,pay_enable,scheme_id,bank_number,branch_number,bank_acct_number)
values(@retailer_id,@name,@appoint_date,@status_id,@cancellation_date,@region_id,isnull(@credit_limit,0),@contact_name,@addr1,@addr2,@state_id,@pincode,@telephone,@mobile,@fax,@email,@distributor_id,@tax_id,@sell_enable,@cancel_enable,@pay_enable,@scheme_id,@bank_number,@branch_number,@bank_acct_number)
end
|
|
|
|
|
OK, this is for school work ? No-one is paying for this code, right ?
A malicious user can trivially erase your entire database.
As to the code, You're storing dates as strings instead of a date type. Doesn't your db have a date type ? This means that something in your code has to be doing the conversion. Which variable in this mess is the one that's being changed ? you've stepped through the debugger and you're sure a null is being passed ? I don't see how that is possible, a string from a textbox is never null.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi All,
I have one problem.I have done chat application.but my problem is:
suppose one customer and four employees are online.customer wants to chat perticular employee.First i want to send message to that perticular employee:"pls be online,customer wants to chat".
but my problem is how can i send this alert message to perticular employee who selected by customer?
This is the web appication.
pls help as early as possible.
Thanx
|
|
|
|
|
You obviously cannot, unless it's via email. This is an obvious limitation of a web app, if they are not on your page, you can't send them anyting.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|