Solved

I can't insert row in my database on sql server 2000

Posted on 2006-07-03
11
213 Views
Last Modified: 2010-04-05
On my Computer:

I have sql server 2000.
database: nucleo
i'm using the user sa to connect to the server
but when I try to insert a row in my database nucleo, my application close and any row was not insert.


On my online server MSSQL5.EASYCGI.COM

they have sql server 2000
I use other user that i created on them homepage.
database: nucleo.
same tables.

WORKS FINE.WORKS FINE.WORKS FINE.WORKS FINE.WORKS FINE ON ONLINE SERVER.


WHAT HAPPENING WHITH MY SQL SERVER 2000 IN MY COMPUTER.

0
Comment
Question by:rafaelrgl
11 Comments
 
LVL 3

Expert Comment

by:Ubethatway
ID: 17034675
Hi, im just taking a stab at this, but could it be that the permissions for the useres differ betwen the two servers?? I havent done a lot with DB server, but from what ive seen with MySQL, theres a lot of  different permissions options... could it simply be the user you are using on your home PC doesnt have the correct permissions?? If so, and exceptions havent been handled correctly in your code, this could be the problem.

Just an idea, Mark
0
 
LVL 1

Author Comment

by:rafaelrgl
ID: 17034687
I try to give the high permissions to the user that i am using to connect to my sqlserver, and does not work. I am thinking that i forgot something behind, but I don't know what is it. That my problem and I still have it.
0
 
LVL 3

Assisted Solution

by:Ubethatway
Ubethatway earned 125 total points
ID: 17034901
Can you not use the administration tools that are bundled with the server to connect directly to it to change the permissions?

Mark
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 11

Assisted Solution

by:calinutz
calinutz earned 125 total points
ID: 17035266
What componments do you use to connect to the SQL Server? How do you do the insert? Paste some code here and perhaps it would be easyer to understand your problem.

Regards
0
 
LVL 12

Accepted Solution

by:
Ivanov_G earned 125 total points
ID: 17035279
try
  // INSERT IN DATABASE
except
  on E: Exception do
    begin
      ShowMessage(E.Message);
    end;
end;

Show us what is the error message. It will give some more information what is the problem
0
 
LVL 4

Assisted Solution

by:kenpem
kenpem earned 125 total points
ID: 17036292
Isolate SQL first.... fire up a Query Analyser and run insert a row there..... does that work? If YES, there is a problem with the Delphi side of it, dig deeper - Ivanov's error-trapping will give you a good idea what's going wrong.

If the query fails at QA level, you'll at least get a decent error message there to work with.
0
 
LVL 1

Author Comment

by:rafaelrgl
ID: 17038585
that's is the sentence sql:

//////////////////////////////////////
UPDATE TB_HORAS SET
 USADO='17:02',
 RESTANTE='16:02',
 STATUS='1'
 WHERE (MAQ='COMP06') AND
 (IDUSUARIO='48') AND
 (HORAINI='7/3/2006 7:39:32 PM')
//////////////////////////////////////

That's the error when i try to update this on my server sql 2000 in my computer

//////////////////////////////////////

UPDATE FAILED

//////////////////////////////////////



BUT IF I TRY OTHER SERVER SQL THAT I HAVE ON MY WEB SITE, LIKE MSSQL5.EASYCGI.COM. THAT WORKS OK.
0
 
LVL 1

Author Comment

by:rafaelrgl
ID: 17038595
BY THE WAY, I AM USING THIS TO CONECT TO DATABASE:

TDATABASE
TDATASOURCE
TQUERY
TUPDATESQL
0
 
LVL 1

Author Comment

by:rafaelrgl
ID: 17038609
THAT'S HOW I TRYED:


             BD.SQLHoras.ModifySQL.Clear;
             BD.DSHoras.DataSet.Edit;
             BD.SQLHoras.ModifySQL.Add('UPDATE TB_HORAS SET ');
             BD.SQLHoras.ModifySQL.Add(' USADO=''' + tempuso + ''',');
             BD.SQLHoras.ModifySQL.Add(' RESTANTE=''' + temprest + ''',');
             BD.SQLHoras.ModifySQL.Add(' STATUS=''1''');
             BD.SQLHoras.ModifySQL.Add(' WHERE (MAQ=''' + BD.Query_MaqMAQ.Text + ''') AND');
             BD.SQLHoras.ModifySQL.Add(' (IDUSUARIO=''' + BD.Query_MaqIDUSUARIO.Text + ''') AND');
             BD.SQLHoras.ModifySQL.Add(' (HORAINI=''' + BD.Query_MaqTIMER01.Text + ''')');
             BD.Query_Horas.ApplyUpdates;
0
 
LVL 1

Author Comment

by:rafaelrgl
ID: 17038705
I know what happening, I copy my database from this serversql on my website to my server sql on my computer, but I don't know what happening, becouse my fields identity ( ID ) IN ALL TABLES  was set to no.
how can I copy my database whithout lost this information in my database?

what I did was:

I make a backup from my server on line.
After that, I restore the backup to my computer.

((((((((WRONG))))))))


HOW IS THE RIGHT WAY TO DO THAT?
0
 
LVL 1

Author Comment

by:rafaelrgl
ID: 17038794
I founded, I simply transfer the objects from one server to other. that's works good.

thank you!!!!!
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Convert Jpg /PNG To GIF 5 134
Delphi XE10 Round Image 2 120
Magic Software info 18 130
Delphi inherited method 6 67
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now