|
|
Thanks for yourm warning.
Sure I have read about it.
|
|
|
|
|
|
Oracle tutorials etc... where you can also find intimate details of error ORA-00984
[^]
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Thanks both....
I will start with the first solution in development and then work on the attacks problem before I move to production.
David
|
|
|
|
|
In above code, strSQL does not translate variable value because it is included instring.
Please releace above string with following strSQl
string strSQL = "INSERT INTO table(Firstname, Lastname, Company, Email, City, State, ActivityDate, Country) VALUES('" + EnteredFirstName + "','" + EnteredLastName + "','" + EnteredCompany + "','" + EnteredEmail + "','" + EnteredCity + "','" + EnteredState + "','" + TodayStamp + "','" + EnteredCountry + "')";
myODBCCommand.ExecuteNonQuery() will also fetch error if your passing value doesnot match with database datatype
Kumar
|
|
|
|
|
Dear All
I have taken a backup for my database and trying to restore it on another computer .....but its showing me error while i m restoring this database...
error is Too many backup devices specified for backup or restore only 64 are allowed.
pls give me a solution if someone knows abt that...
Dinesh Sharma
|
|
|
|
|
|
my application is actually a web application where i manually upload CSV file to the database.but i want to automate the process,so i have thought of a second stage to this application i.e through a windows application i would download the CSV file from the NSEIndia.com site automatically and then upload the same to SQLServer on the server.i am facing a problem with upload i.e exporting the data to the database.it would be a great help to me if any one could provide me a solution either in VB.Net code or C# code.
AMIT(TATA CMC)
|
|
|
|
|
|
Hey everybody
Ok so here i am, programming a bit for 2 years now (VB.Net 2003). And now i got a lot of data, like 30000 items with many properties and stuff. From all those i want to select only a couple based on those properties and then do stuff with it. So i was thinking about a database. But were do start? I was reading some tutorial and they started with a connection string, but how do i know which connection i have? Do i have to install something?
Database stuff is a huge black hole in my head, so any help would be welcome
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
-- modified at 0:53 Tuesday 11th July, 2006
|
|
|
|
|
|
Some of these are good:
http://www.codeproject.com/vb/net/#Data+Access[^]
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Hi,
Using VS2003 and C#, I have created oleDbAdapaters to fill a data set and used a combo box to allow easy selection of choices for amending record fields. Here's the code for the combobox:
// comboBoxMembershipLevel
//
this.comboBoxMembershipLevel.DataBindings.Add(new System.Windows.Forms.Binding("SelectedItem", this.myClubDataSet12,"MembershipLevels.MembershipLevelName"));
this.comboBoxMembershipLevel.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.myClubDataSet12, "MemberDetails.MembershipLevel"));
this.comboBoxMembershipLevel.DataSource = this.myClubDataSet12.MembershipLevels;
this.comboBoxMembershipLevel.DisplayMember = "MembershipLevelName";
this.comboBoxMembershipLevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.comboBoxMembershipLevel.Location = new System.Drawing.Point(584, 80);
this.comboBoxMembershipLevel.Name = "comboBoxMembershipLevel";
this.comboBoxMembershipLevel.Size = new System.Drawing.Size(121, 21);
this.comboBoxMembershipLevel.TabIndex = 40;
this.comboBoxMembershipLevel.ValueMember = "MembershipLevel";
//
The table "MembershipLevels" has three fields - ID(autogenerated key), MembershipLevel(int) and MembershipLevelName(text). The MemebershipLevel is stored for each record in the table MembersDetails.MembershipLevel(int).
When I select the first member of the drop down list and then move away and back to the record concerned I get 'System.Data.DataRowView' in the display box. Chosing any of the other members of the drop down list and all works fine - it only occurs when I chose the first member of the drop down list.
Saving the changes from the dataset to the database whilst the 'System.Data.DataRowView' is showing updates the database with the correct field data (ie a number and not 'System.Data.DataRowView').
Be kind to me - Im only learning.
TIA.
Regards,
Glen Harvy
|
|
|
|
|
Hey Everyone,
Can you connect to SQL Server Express using C# or VB? I've been reading that SQL Server doesn't allow remote connections, but that does mean that I can't connect to a localhost database?
I'm trying to create an application that will connect to a db on the same system.
Thanks in advance!
Karthik
|
|
|
|
|
Karthik Gaekwad wrote: I've been reading that SQL Server doesn't allow remote connections,
You have to configure it to allow remote connections. Use the configuration management tool that comes with SQL 2005 Express.
PJC
|
|
|
|
|
Hello,
Looking for some advice on choosing a local data source for a call reporting project that will have approximately 25 end users using it. I have currently developed the app in vb.net.
As of now, I am just using SQL Express edition and if I am deploying the project, I would like to be able to quickly access the data on the end users PC. Also, i'm finding that if I make a change in any of my table definitions (such as adding or removing a column), it seems to clear the data in my tables.
On the other hand, if I use MS Access, I get quick access to the tables if need be and I can make changes to the table without worrying about loosing data.
Any suggestions from a maintenance / performance perspective on the 2 sources?
Thanks,
Rashar
-- modified at 19:45 Monday 10th July, 2006
|
|
|
|
|
I think SQL server is a better option.
In faith there is enough light for those who want to believe and enough shadows to blind those who don't.
- Blaise Pascal
|
|
|
|
|
I have an asp.net project in which I pass a part number, and a part description to the stored proc.
What I want to insert (in table Parts)in the end is the part number, and the part type ID. I get that part type ID from table PartType.ID.
So my syntax is correct in that Enterprise manager makes no fuss, but when I actually do the insert I get the error "Cannot insert the value NULL into column 'PartTypeId',
table 'PartsDB.dbo.Parts'; column does not allow nulls.
INSERT fails. The statement has been terminated." I am not sure what is wrong with the code here.
CREATE PROCEDURE [dbo].[UpdatePart_Step_1]<br />
@PartNumber varchar (15),<br />
@PartType varchar (60) <br />
<br />
AS<br />
declare @pt_id integer<br />
<br />
if NOT EXISTS (Select * from Parts where PartNumber = @PartNumber)<br />
BEGIN<br />
<br />
SELECT @pt_id = pt.ID FROM PartTypes pt <br />
<br />
INNER JOIN Parts p on pt.ID = p.PartTypeID<br />
<br />
WHERE pt.Description = @PartType<br />
<br />
insert into Parts<br />
(PartNumber, PartTypeID)<br />
<br />
VALUES<br />
(<br />
@PartNumber,<br />
@pt_id<br />
)<br />
END<br />
return 0<br />
GO
Does anyone see my problem?
|
|
|
|
|
|
Hi,
I'm trying to get the sum of two fields:
declare @totalsum money
set @totalsum = (sum(fieldname1 + fieldname2))
the error message displays an invalid fieldname for both fields, i have the fieldnames spelled correctly but still get the error.
Any suggestions would be great.
Thanks,
Nino
Italy == World Champions
-- modified at 15:06 Monday 10th July, 2006
|
|
|
|
|
I'm not sure what you are trying to do, but if you want the sum of all (fieldname1 + fieldname2) values for every record in a particular table, then you need to supply the table name and change the word set to select .
declare @totalsum money
select @totalsum = (sum(fieldname1 + fieldname2))<code> from tablename</code>
But most likely, you want the sum of these two fields for a particular row, so you would need a where clause:
declare @totalsum money
select @totalsum = fieldname1 + fieldname2 from tablename<code> where primarykeyfield = 1</code>
or something...
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Ok, I should have posted the entire code block, I tried the method listed above with the rest of the SELECT statement and get an error message as follows.
Server: Msg 141, Level 15, State 1, Line 4
A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations.
Here is the entire code block:
declare @totalsum money
select @totalsum = (sum(d.amount + d.debit)), a.officer, d.amount,d.debit, e.fullesc as ESCROW_AND_CITY_CODE, e.open_date, e.close_date, e.ftype, a.street, a.city, a.state, a.zip
from escrow e inner join a10 a on e.escrow = a.escrow inner join e120 d on d.escrow = e.escrow and a.officer is not null order by e.open_date
Thanks
Nino
|
|
|
|
|
Yeah, you can't do that. If you want to sum all amount and debit columns for the entire table...then you wouldn't also pull back all the other fields. If you want to just add amount and debit together for each record, then you don't need a sum aggregate function.
select d.amount + d.debit as recsum, a.officer, d.amount,d.debit,
e.fullesc as ESCROW_AND_CITY_CODE, e.open_date, e.close_date, e.ftype,
a.street, a.city, a.state, a.zip
from escrow e inner join a10 a on e.escrow = a.escrow
inner join e120 d on d.escrow = e.escrow and a.officer is not null
order by e.open_date
declare @totalsum money
select @totalsum = sum(d.amount + d.debit)
from escrow e inner join a10 a on e.escrow = a.escrow
inner join e120 d on d.escrow = e.escrow and a.officer is not null
or you could combine them like this - and every record will have a column with the TotalSum in it:
select (select sum(d2.amount + d2.debit)
from escrow e2 inner join a10 a2 on e2.escrow = a2.escrow
inner join e120 d2 on d2.escrow = e2.escrow and a2.officer is not null) as totalsum,
d.amount + d.debit as recsum, a.officer, d.amount,d.debit,
e.fullesc as ESCROW_AND_CITY_CODE, e.open_date, e.close_date, e.ftype,
a.street, a.city, a.state, a.zip
from escrow e inner join a10 a on e.escrow = a.escrow
inner join e120 d on d.escrow = e.escrow and a.officer is not null
order by e.open_date
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Great! thanks so much.
Nino
|
|
|
|
|