Showing posts with label updating. Show all posts
Showing posts with label updating. Show all posts

Sunday, March 25, 2012

Connectivity with sql server

The problem what iam facing,is while updating records from
a network system to sql server,the time taken is very high.
I would like to know how to make faster updation of record
to my sql database.
And what role does ODBC play here.and is there any log
file or temporary files created at server end,if i would
like to know the path.and does it got to do anything with
the record updation speed.
I would be a great help for me...!!What type of update are you doing? Is this a one-time thing or a
continuously needed update? What is your table structure, what does your
update statement look like? Do you have indexes on the table? What recovery
mode are you running the database in? How many users are connected to the
server when you run this update? Are there any locking/blocking issues? Lots
of questions, answer them and I'm sure someone can help.
Ray Higdon MCSE, MCDBA, CCNA
--
"ssd" <ssd_myworld@.yahoo.com.sg> wrote in message
news:0e8e01c3deff$e7afc9f0$a601280a@.phx.gbl...
quote:

> The problem what iam facing,is while updating records from
> a network system to sql server,the time taken is very high.
> I would like to know how to make faster updation of record
> to my sql database.
> And what role does ODBC play here.and is there any log
> file or temporary files created at server end,if i would
> like to know the path.and does it got to do anything with
> the record updation speed.
> I would be a great help for me...!!
|||I got one sql server connected to 5 workstations,A small
vb application which updates 10-15 fileds,submission of
each record is taking 35-40secs,we will be updating 50
records at a time span of 30-45 minutes.
Here the time taken to update each record is pain taking.
How can i over come this problem inorder to submit my
records faster.
And ODBC got to do anything at workstation end,i mean we
got to configure ODBC at workstation.sqlsql

Sunday, February 12, 2012

Connection problems from VB

When monitoring errors concerning connection and updating data on my MS SQL
Server2000 from a VB application I get these errors.
-2147467259 [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite
(send()).
-2147467259 [Microsoft][ODBC SQL Server Driver]Connection error
-2147467259 [Microsoft][ODBC SQL Server Driver][SQL
Server]SqlDumpExceptionHandler: Process 79 generated fatal exception
c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
-2147467259 [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite
(send()).
The application has been communicating with an MS SQL Server2000 for 5-6
years with no problems of this kind. The problem started when I installed my
application to run against a new MS SQL Server2000 at a new company, and I
am wondering if it could have something to do with how the server is
configured.
I am not sure why the err.description ref. to ODBC SQL Server Driver because
as shown below I use OLEDB connection object.
Any Ideas on how to manage this problem?
Below you can see example of my functions in VB:
Private Sub cmdSelect_Click()
funConnect
set rstMyRecordset = rstExecData(mySelectSQL)
funDisconnect
End Sub
this procedure works just fine
this next code works fine as well, but if I try to run a select as above
after the update if fails with the error in function rstExecData
Private Sub cmdUpdate_Click()
funConnect
rstExecData(myUpdateSQL)
funDisconnect
End Sub
Functions used:
Function funConnect() As Boolean
On Error GoTo errHandler
strCnn =
" driver={SQLServer};server=DC01;uid=sa;pw
d=mysapassword;database=mydatabase"
Set cnn = New ADODB.Connection
cnn.CursorLocation = adUseClient
cnn.Open strCnn
Exit Function
errHandler:
funConnect = False
End Function
Function funDisconnect() As Boolean
On Error GoTo errHandler
If cnn.State = 1 Then
Set cnn = Nothing
Else
Exit Function
End If
errHandler:
funDisconnect = False
End Function
Public Function rstExecData(strSQL As String) As ADODB.Recordset
Set rstExecData = New ADODB.Recordset
rstExecData.CursorType = adOpenDynamic
rstExecData.LockType = adLockOptimistic
rstExecData.Open Trim(strSQL), cnn
End Function
TIRislaaWhat about following line:
strCnn =
" driver={SQLServer};server=DC01;uid=sa;pw
d=mysapassword;database=mydatabase"
This is call to OLEDB for ODBC Provider and ODBC Driver.
Why not OLEDB Driver for SQL Server?
strCnn = "Provider=SQLOLEDB.1;Data Source=DC01;Password=mysapassword;User
ID=sa;Initial Catalog=mydatabase;"
Regards
Jacek
"Tor Inge Rislaa" wrote:

> When monitoring errors concerning connection and updating data on my MS SQ
L
> Server2000 from a VB application I get these errors.
>
> -2147467259 [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite
> (send()).
> -2147467259 [Microsoft][ODBC SQL Server Driver]Connection error
> -2147467259 [Microsoft][ODBC SQL Server Driver][SQL
> Server]SqlDumpExceptionHandler: Process 79 generated fatal exception
> c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this proces
s.
>
> -2147467259 [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite
> (send()).
>
> The application has been communicating with an MS SQL Server2000 for 5-6
> years with no problems of this kind. The problem started when I installed
my
> application to run against a new MS SQL Server2000 at a new company, and I
> am wondering if it could have something to do with how the server is
> configured.
>
> I am not sure why the err.description ref. to ODBC SQL Server Driver becau
se
> as shown below I use OLEDB connection object.
>
> Any Ideas on how to manage this problem?
>
>
> Below you can see example of my functions in VB:
>
> Private Sub cmdSelect_Click()
> funConnect
> set rstMyRecordset = rstExecData(mySelectSQL)
> funDisconnect
> End Sub
> this procedure works just fine
> this next code works fine as well, but if I try to run a select as above
> after the update if fails with the error in function rstExecData
> Private Sub cmdUpdate_Click()
> funConnect
> rstExecData(myUpdateSQL)
> funDisconnect
> End Sub
> Functions used:
>
> Function funConnect() As Boolean
> On Error GoTo errHandler
> strCnn =
> " driver={SQLServer};server=DC01;uid=sa;pw
d=mysapassword;database=mydatabas
e"
> Set cnn = New ADODB.Connection
> cnn.CursorLocation = adUseClient
> cnn.Open strCnn
> Exit Function
> errHandler:
> funConnect = False
> End Function
>
> Function funDisconnect() As Boolean
> On Error GoTo errHandler
> If cnn.State = 1 Then
> Set cnn = Nothing
> Else
> Exit Function
> End If
>
> errHandler:
> funDisconnect = False
> End Function
> Public Function rstExecData(strSQL As String) As ADODB.Recordset
> Set rstExecData = New ADODB.Recordset
> rstExecData.CursorType = adOpenDynamic
> rstExecData.LockType = adLockOptimistic
> rstExecData.Open Trim(strSQL), cnn
> End Function
> TIRislaa
>
>
>|||This connectionstring works OK for select statements, but if I try to update
data, the application hangs totally (don't answer)
Is it possible that there are settings on the SQL server that blocks update
and insert statements?
TIRislaa
"JacekZ" <JacekZ@.discussions.microsoft.com> skrev i melding
news:0B026699-EDBA-4B7E-8B1F-BFCED79AA73E@.microsoft.com...
> What about following line:
> strCnn =
> " driver={SQLServer};server=DC01;uid=sa;pw
d=mysapassword;database=mydatabas
e"
> This is call to OLEDB for ODBC Provider and ODBC Driver.
> Why not OLEDB Driver for SQL Server?
> strCnn = "Provider=SQLOLEDB.1;Data Source=DC01;Password=mysapassword;User
> ID=sa;Initial Catalog=mydatabase;"
>
> Regards
> Jacek
> "Tor Inge Rislaa" wrote:
>