Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
gerten
Starting Member
17 Posts |
Posted - 2003-03-19 : 05:04:12
|
I get following errorADODB.Recordset (0x800A0BB9)The code:sPersonID=Request.Form("PersonID")sDatum=Request.Form("Datum")sDagsvikt=Request.Form("Dagsvikt")Set Connect = Server.CreateObject("ADODB.Connection")Connect.Open "banta"Set rs=Server.CreateObject("ADODB.Recordset")rs.Open SQL,ConnectSQL = "Insert Into Viktreg(PersonID,ViktDatum,Vikt) VALUES ('" & sPersonID &"'," & sDatum & "," & sDagsvikt &")"connect.execute(SQL) rs.Closeset rs= nothingconn.Closeset conn= nothing |
|
samsekar
Constraint Violating Yak Guru
437 Posts |
Posted - 2003-03-19 : 05:28:08
|
You don't have to open a new recordset other than select statement. Rather you can say recordsets are used to get records from table and display at your frontend.The error might be because you have assigned to SQL Variable after opening recordset. Try removing statements1. set rs2. rs.open3. rs.close4. set rs=nothing.Sekar~~~~Success is not a destination that you ever reach. Success is the quality of your journey. |
 |
|
gerten
Starting Member
17 Posts |
Posted - 2003-03-19 : 05:37:14
|
I did that and following error:Körningsfel i Microsoft VBScript (0x800A01A8)Objekt krävs.: 'rs'/banta/dagsvikt.asp, line 84 |
 |
|
samsekar
Constraint Violating Yak Guru
437 Posts |
Posted - 2003-03-19 : 05:57:00
|
quote: I did that and following error:Körningsfel i Microsoft VBScript (0x800A01A8)Objekt krävs.: 'rs'/banta/dagsvikt.asp, line 84
I don't understand your language.Anyway Make sure you are not using rs in your code since you removed the declarations. Here is a simple sample code.<%@ Language=VBScript %><%strUser="sekar"Set Connect = Server.CreateObject("ADODB.Connection")Connect.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;PWD=sekar;Initial Catalog=master;Data Source=vi0037"SQL = "insert into user_logins (userid) values ('" & strUser &"')"connect.execute(SQL)connect.Closeset connect= nothing%>Sekar~~~~Success is not a destination that you ever reach. Success is the quality of your journey. |
 |
|
gerten
Starting Member
17 Posts |
Posted - 2003-03-19 : 10:32:08
|
Soon i get crazy Wrote as you say an still get an errorMicrosoft OLE DB Provider for ODBC Drivers (0x80004005)[Microsoft][Drivrutin for ODBC Microsoft Access] Operationen must use an question that can be updated./banta/dagsvikt.asp, line 92 |
 |
|
samsekar
Constraint Violating Yak Guru
437 Posts |
Posted - 2003-03-24 : 02:27:00
|
I don't find any problem here. Can you post your script?Sekar~~~~Success is not a destination that you ever reach. Success is the quality of your journey. |
 |
|
|
|
|