bemine_naren
10-06-2005, 09:08 AM
Hi,
I have been having problem with his syntax.
i wanted to connect to the database using pooling.so i developed the code and thought to add values to it. But i am getting errors.
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Invalid object name 'PROFILE'.
This is the statement in he file global.asa.
Application("connectionstring")="Provider=SQLOLEDB; Data Source =(local); Initial Catalog = petstore; User Id = naren; Password= bharani"
and this is the actual code.
<%
Set cnn=Server.CreateObject("ADODB.connection")
cnn.Open Application("ConnectionString")
Set cmn=Server.CreateObject("ADODB.command")
Set cmn.ActiveConnection=cnn
cmn.commandText="Insert into PROFILE(Profile_ID,firstname,lastname,sex,age,[emailid],[password]) values(?,?,?,?,?,?,?)"
cmn.prepared=true
cmn.parameters.Append cmn.createParameter("profile_ID",200, ,10)
cmn.parameters.Append cmn.createParameter("firstname",200, ,25)
cmn.parameters.Append cmn.createParameter("lastname",200, ,25)
cmn.parameters.Append cmn.createParameter("sex",200, ,6)
cmn.parameters.Append cmn.createParameter("age",3, ,4)
cmn.parameters.Append cmn.createParameter("[emailid]",200, ,50)
cmn.parameters.Append cmn.createParameter("[password]",200, ,20)
cmn("profile_ID")="A000001"
cmn("firstname")="narendra"
cmn("lastname")="bharani"
cmn("sex")="male"
cmn("age")="23"
cmn("[emailid]")="bemine.naren@gmail.com"
cmn("[password]")="narendra"
cmn.execute
%>
I have checked the security of the tables, they are fine.
The error no is indicting multiple errors.I couldn't figureout wht the error is. Please let me the soultion if there is one.
thanks
naren
I have been having problem with his syntax.
i wanted to connect to the database using pooling.so i developed the code and thought to add values to it. But i am getting errors.
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Invalid object name 'PROFILE'.
This is the statement in he file global.asa.
Application("connectionstring")="Provider=SQLOLEDB; Data Source =(local); Initial Catalog = petstore; User Id = naren; Password= bharani"
and this is the actual code.
<%
Set cnn=Server.CreateObject("ADODB.connection")
cnn.Open Application("ConnectionString")
Set cmn=Server.CreateObject("ADODB.command")
Set cmn.ActiveConnection=cnn
cmn.commandText="Insert into PROFILE(Profile_ID,firstname,lastname,sex,age,[emailid],[password]) values(?,?,?,?,?,?,?)"
cmn.prepared=true
cmn.parameters.Append cmn.createParameter("profile_ID",200, ,10)
cmn.parameters.Append cmn.createParameter("firstname",200, ,25)
cmn.parameters.Append cmn.createParameter("lastname",200, ,25)
cmn.parameters.Append cmn.createParameter("sex",200, ,6)
cmn.parameters.Append cmn.createParameter("age",3, ,4)
cmn.parameters.Append cmn.createParameter("[emailid]",200, ,50)
cmn.parameters.Append cmn.createParameter("[password]",200, ,20)
cmn("profile_ID")="A000001"
cmn("firstname")="narendra"
cmn("lastname")="bharani"
cmn("sex")="male"
cmn("age")="23"
cmn("[emailid]")="bemine.naren@gmail.com"
cmn("[password]")="narendra"
cmn.execute
%>
I have checked the security of the tables, they are fine.
The error no is indicting multiple errors.I couldn't figureout wht the error is. Please let me the soultion if there is one.
thanks
naren