W
Wardeaux
Hey, all!
I have an asp.net page, uses ADO.NET connection to create a DB and insert a
UID/Password into one of the tables inside the new DB. Here's what I'm
seeing:
1) If I ONLY create the DB("Create database abc"), I can delete the DB right
away.
2) If I create the DB and simply OPEN a connection to the new DB, I can't
delete the DB for 5 minutes: says it is currently in use.
again, if I only run func1, everything deletes fine, if I run Func1 then
func2, a connection is being left open...
here's my code:
function func1()
strSQL = "Create database ABC"
oDBCon = New SqlClient.SqlConnection(MyFirstConnString)
oDBCon.Open()
Dim oDataCMD As New SqlClient.SqlCommand(strSQL, oDBCon)
RowsAffected = oDataCMD.ExecuteNonQuery()
oDataCMD.Dispose()
end function
function func2()
oDBCon2 = New SqlClient.SqlConnection(MyNewConnString)
oDBCon2.Open()
oDBCon2.Close()
end function
Is this a timing issue or something like SQL has to update a something and
it takes 5 mins before it is available? ANY help is appreciated!!
wardeaux
I have an asp.net page, uses ADO.NET connection to create a DB and insert a
UID/Password into one of the tables inside the new DB. Here's what I'm
seeing:
1) If I ONLY create the DB("Create database abc"), I can delete the DB right
away.
2) If I create the DB and simply OPEN a connection to the new DB, I can't
delete the DB for 5 minutes: says it is currently in use.
again, if I only run func1, everything deletes fine, if I run Func1 then
func2, a connection is being left open...
here's my code:
function func1()
strSQL = "Create database ABC"
oDBCon = New SqlClient.SqlConnection(MyFirstConnString)
oDBCon.Open()
Dim oDataCMD As New SqlClient.SqlCommand(strSQL, oDBCon)
RowsAffected = oDataCMD.ExecuteNonQuery()
oDataCMD.Dispose()
end function
function func2()
oDBCon2 = New SqlClient.SqlConnection(MyNewConnString)
oDBCon2.Open()
oDBCon2.Close()
end function
Is this a timing issue or something like SQL has to update a something and
it takes 5 mins before it is available? ANY help is appreciated!!
wardeaux