@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10



Comments:

<0> not like '%whatevah%'
<1> thx
<0> no sweat
<1> :)
<0> you're lucky some of the regs here would have made you wade through 4 or 5 pages of disparaging remarks before they answered the question
<0> after all this is EFnet
<2> haha
<2> Guest3 is savior
<3> halo...
<3> think it would be more or less efficient to pull every row from a table (only 2 cols) and run leveshtein on one of the cols, or make a regex statement that pulls all the rows that match where the regex statement would match anything within x permutations of my target
<4> hi, im connecting to sql server 200 thru my java game using jdbc. every game loop im updating data in a table but it seems to consuming memory to the point where it crashes after about 8mins
<3> are you closing the connections?
<4> i have a connection pool that i get my connection from
<4> should i still always close it?
<3> yes
<3> well i guess that depends.



<3> everytime you open a connection you should close it when you are done with it
<4> k ill do some tweaking
<5> I'm running into concurrency problems when inserting into a table whose primary key table was inserted directly before it, it seems that before the first sp which inserts into the place the FK is drawn from is inserted, the sp that depends upon that FK attempts to insert as well
<5> I need to lock the connection until the first sp finishes
<4> gahd. should i always close statements and resultsets?
<5> not if you have a garbage collector
<5> let me rephrase, table 2 depends on table 1 through a foriegn key constraint, I insert into table 1 and then into table 2 but it seems before table 1 is finished inserting table 2 attempts to start and gets rejected because table 1 which it depends on isn't finished inserting yet. How to I lock a connection or the table such that my insert can finish before table 2 attempts to see if what it inserted is there
<3> it is always good practice
<3> the garbage collector might to get to it fast enough.
<3> if you have memory leaks that is the first place i would loo.
<3> *look too
<4> k
<5> well. yeah if you have mem leaks
<6> VRik: Are you using two connections?
<5> nope 1
<5> via ASP
<6> One batch or multiple?
<5> ASP -> ADODB.Connection -> ADODB.Command -> stored procedures
<5> multiple
<6> Then unless you are specifically p***ing flags to ADODB to inform it to run the command asynchronously, they are.
<6> The Command.Execute will not return until the sproc completes.
<5> I have looked all over MSDN and google, no luck finding a way to get Command to be asynchronous
<5> it's also possible that I am looking in the wrong places of course
<6> You don't want it to be asynchronous, particularly in ASP
<5> Normally I would agree
<5> are we in agreement that asynchronous means not at the same time?
<6> No, asynchronous means that your program continues while the command executes.
<6> synchronous, which is the default behavior, waits until the command completes.
<3> it doesnt wait on a response.
<6> I don't see where you're having a problem. If the connection calls a sproc to add a record, unless you rollback a transaction or delete the record, it'll be there by the time you call another sproc.
<5> You know I am getting that connection from a global object and maybe it has it set to asynchronous
<6> A global object"?
<6> You're sharing a connection across multiple requests?
<3> holy christ man.
<5> I'm not 100% sure, either 1 connection or a connection pool
<3> either way. bad idea.
<5> I'm not the CTO, I can't make changes to the way IIS does it's thing, but I guess I could make my own connection
<3> there is nothing wrong with opening a connection doing what needs to be done and closing it.
<6> IIS doesn't control how ADO works.
<5> So synchronisity is set on the connection or the command?
<6> Command
<3> asp or asp.net?
<5> adLockPessimistic?
<6> Doesn't matter.
<5> asp, leagcy app, asp.net next year
<3> no i was wondering what he is using
<3> ah.
<6> Are you obtaining an instance of the ADODB.Connection each time you make an ADODB.Command, or do you obtain it once and keep it in a variable?
<5> Once
<5> And yes set oConn = CreateObject..
<6> Well, your situation is not normal.
<6> CreateObject("ADODB.Connection") ?
<5> Gimme a sec to make sure the app I am working with is what I say it is, sec
<6> oy
<5> Every time a page is loaded in the app, a call is made oConn = CreateObject("ADODB.Connection"), I then use that conneciton for the life of the page
<6> That should be okay then.
<5> however I encapsulate each sp in it's own function and create a new Command in the function which I use to execute the sp
<6> That is also fine as long as you p*** and use the same connection, ***uming that you're using transactions.
<3> that should be fine too.
<6> If you're not using transactions then it wouldn't matter.
<5> in this instance transactions hinder me, so I'm not using them



<6> How are you determining the PK of the first table after the value is inserted?
<5> I am not messing with the PK, that was definied on table creation and just fires on a create/update/delete, in this case, I am inserting into the table and it's erroring out due to the FK constraint
<6> Yes, but the FK violation happens because you don't have a good value from the parent table.
<5> right
<5> which doesn't make sense because after the fact I inspect the parent table and the value is there
<5> in fact, the child table actually inserts in spite of failing due to the PK constraint
<5> I am guessing that by the time the child table attempts to insert the parent table has completed inserting and the FK violation is no longer valid
<6> The DML statement involved with modifying a table will not occur if there is a constraint violation.
<6> No, that is not correct.
<5> I wish that were true. I will test it again right now to make absolutely sure.
<6> If the child table is getting a record when you call the sproc then that is not where you are getting the error.
<6> The sprocs might be trying to do more than simply write a record.
<6> I ***ume you have access to their contents.
<5> yes I do, admin rights on SQL Server, using QA/Profiler/EE to try and solve this
<5> the last statement in Profiler is the child table insert
<5> before I get the PK constraint violation
<6> Then the second sproc is trying to do something else.
<6> Or perhaps an insert trigger on the child table.
<5> hrmm, maybe...
<5> yeah I was thinking that, not too many triggers in the DB but worth looking into
<6> By the time Command.Execute() returns, the sproc has fully completed
<6> And, within a sproc, DML statements themselves are always synchronous.
<2> every time i use OleDb i run into a problem which i barely figure ou
<5> hrmm, checking the child table for triggers
<2> out
<2> and it's always the same ****
<2> you must add oledb params to a command in proper order
<2> how stupid is that
<6> hehe
<7> hola
<2> i've been stressing for two hours
<2> "why the hell doesnt this update statement update?"
<2> i've search whole google
<2> then figured it out by accident
<2> and the funny thing is, i had this problem before but i forgot :)
<2> "update tbl set a = @a where b = @b
<2> i had
<2> params.add(@a then params.add(@b
<2> but you must add @b then @a
<2> heh
<6> I thought OleDB only supported ? as the parameter in the SQL.
<5> yeah, placeholders
<2> i guess
<2> but i am using named
<5> update tbl set a = ? where b = ?
<5> <--- trying to find where the triggers are in Enterprise Manager
<2> yea that's what i've been using with RDO
<2> i guess it converts to ? hhe
<8> hey guys
<8> can you check out my registration thingy
<8> www.dailytutor.com/become3.php
<8> if you don want to fill out all the info, try signing in as JohnTutor p***word JohnTutor also
<2> worx
<8> u like it? in particular, try the ADD SUBJECTS / ADD COURSES thingy on the 3rd step
<8> tell me if you get ANY errors at all plz
<8> add some new courses if u like, etc.
<8> remove them, have a ball!
<5> Halo_Four : you were right, the childtable itself is generating the error on the insert, it's something just after that
<5> err isn't
<5> Profiler shows it finishing correctly
<6> add stmtstarting to the profiler, see what it's trying to run next
<5> will do
<5> hrmm, how do I do that? heh
<6> Stop the trace, go to Properties, go to the Events tab, under Stored Procedures select SP:StmtStarting
<5> what version of SQL are you running?
<5> SQL 2000 or 2005?
<5> nm
<5> found it
<0> hey does 2005 have the ability to track index hits
<0> heh, I'll take that as a no
<5> Halo_Four : child table was the last one starting and the last line was the the exec statement for the sp that inserts into the child table (Event Cl***: RPC Completed)
<0> it'd be SO helpful to clean up legacy systems...darn
<2> Halo you ever seen perflib cautions in Eventlog?
<9> some dude didn't pay me for an ebay auction. i'm scared to leave negative feedback though because he'll probably turn around & give me negative


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #sql
or
Go to some related logs:

the_chase jet
#linuxhelp
kinantot ako
#mirc
what happen to UMESX
MSSQL query to combine 2 fields
#computers
#goal
#beginner
#flash



Home  |  disclaimer  |  contact  |  submit quotes