|
It has nothing to do with the number of fields. You have just made an error when adding the other fourteen fields.
That is about as much as anyone can say without seeing the actual code.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
Sorry all of u
Actiually i didnt post my second error
Some times It is giving "Unspicified Error" in connection.open()
Or it is giving "Syntax error in INSERT INTO statement"
And i chk the insert statement also no errors in that
Plz chk my code
MYCODE
----------
Dim sConnectionString
Dim objCmd As New System.Data.OleDb.OleDbCommand
sConnectionString = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Some.mdb") & ";")
Dim objConn As New System.Data.OleDb.OleDbConnection(sConnectionString)
objCmd.Connection = objConn
objCmd.CommandText = "INSERT INTO Info(1,2,3,4,5,6,----------------20) values('" & 1.Text & "','" & 2.Text & "','" &
3.Text & "','" & 4.Text & "','" & 5.SelectedItem.Text & "','" & 6.SelectedItem.Text & "',--------------------- up to 20
fields)"
objCmd.Connection = objConn
objConn.Open()
objCmd.ExecuteNonQuery()
objConn.Close()
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
No, that is not the code that you are using. You can not use numbers as names of objects, so it won't even compile. Also, you can not use numbers as field names in the database like that.
If you don't want to post the exact code that you are using, put together a working example that demonstrates the problem. There is no point in trying to find an error in a piece of code that is different from the code where the actual error is.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
My mean is not hide the code my fields name are to big thats y i put fields name as numbers to better understood
Plz chk this
MYCODE
---------
Dim sConnectionString
Dim objCmd As New System.Data.OleDb.OleDbCommand
sConnectionString = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Names.mdb") & ";")
Dim objConn As New System.Data.OleDb.OleDbConnection(sConnectionString)
objCmd.Connection = objConn
objCmd.CommandText = "INSERT INTO
Info(username,userpasswd,Name,email,try,loc,other,other1,num,yearwise,monthwise,skils,funarea,current,ug,pg,greatpg,RB,ugo
ther,pgother,postother,cpr) values('" & uname.Text & "','" & pass.Text & "','" & name.Text & "','" & email.Text & "','" &
c***ry.SelectedItem.Text & "','" & loc.SelectedItem.Text & "','" & other.Text & "','" & other1.Text & "','" & no.Text & "','"
& yearwise.SelectedItem.Text & "','" & monthwise.SelectedItem.Text & "','" & skilsmen.Text & "','" & Label1.Text & "','" &
currrent.SelectedItem.Text & "','" & ugrad.SelectedItem.Text & "','" & pggrad.SelectedItem.Text & "','" &
pggreat.SelectedItem.Text & "','" & RB.SelectedItem.Text & "','" & u1.Text & "','" & p1.Text & "','" & greatpg1.Text & "','"
& cpr.Text & "')"
objCmd.Connection = objConn
objConn.Open()
objCmd.ExecuteNonQuery()
objConn.Close()
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
That's better. The problem is in the information that you left out in the previous post.
"Name" is a reserved keyword in Access.
"Current" is a reserved keyword in SQL, Jet and ODBC.
---
b { font-weight: normal; }
|
|
|
|
|
HI
I changed DB fileds still it is giving same ERROR
Plz Chk this code
MYCODE
---------
Dim sConnectionString
Dim objCmd As New System.Data.OleDb.OleDbCommand
sConnectionString = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("DB22.mdb") & ";")
Dim objConn As New System.Data.OleDb.OleDbConnection(sConnectionString)
objCmd.Connection = objConn
objCmd.CommandText = "insert into user(uname,pass) values(" & TextBox1.Text & "," & TextBox2.Text & ")"
objCmd.Connection = objConn
objConn.Open()
objCmd.ExecuteNonQuery()
objConn.Close()
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
User is a reserved keyword.
---
b { font-weight: normal; }
|
|
|
|
|
Thx
I got it
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Hi,
i want to write a javascript function in .aspx file to
make a button enable property false and i want to take the value from a textbox to a javascript function and also i want to put some values in a textbox using javascript function.i tried a lot .but i didn't get the correct code.i know the same in asp .but in asp.net 1.1 that code is not working
Please give me a reply.
Thanks and regards
anu
|
|
|
|
|
What exactly have you done? Or what error are you getting?
Best Regards,
Apurva Kaushal
|
|
|
|
|
instead of making textbox enable false make it readonly
Mahendra
|
|
|
|
|
Is your web control or HTML control ?
html Element has not property "readOnly"
if use javascript to control a button enable property that I don't know
Haha..,sorry,I can't help you
WWF Let our word health and happy
|
|
|
|
|
hi dear friends,
I want to validate asp.net2 web controls (<asp:textbox>) by javascript but
but it can not recognized.(document.form1.TextBox1.value)
the other point is that content pages dont have form tag, this tag is just in master page while my controls are placed in content page.
Please refer me to helpful sites about this case.
thank you
Regards
yousefi
Tehran-Iran
zahra yousefi
yousefi105@yahoo.com
|
|
|
|
|
actually when u use masterpage concept asp.net add pageid before each control so for accessing any control from javascript prefix pageid with control
u can check pageid by viewsource of your file
Mahendra
|
|
|
|
|
hello!
i have problem to create new asp.net web applicatio with VC++ or C#.
what settings should be set for my project or iis service?
-- modified at 7:00 Tuesday 12th September, 2006
Zo.Naderi-Iran
|
|
|
|
|
Are you using Visual Studio 2005 or 2003 ?
|
|
|
|
|
How can I provide permissions to shared Drive or Network Drive folders from asp.net Page?
Any help plz??????????????
Thanks,
Bhasker P
|
|
|
|
|
at iis, there is a asp.net user running all the time, in order to share folders and files in your website, you must to modify the asp.net user access permissions.
keep Learning...
|
|
|
|
|
ASPNET account gives access to the users under that account. I am using impersonate. So this will identify the current user. This is working fine. How we can authorized the folders from asp.net page using impersonate?
Thanks,
Bhasker P
|
|
|
|
|
I'm working on a web application and I have one really BIG problem. I'm just not able to get image from image scanner plugged in the Client computer... And I'm wondering:"Is it possible to create a web application that uses scanners plugged in the Clients, and if it is, how can I create one??"...
Please help becouse it's killin' me
tnx for any help and replay you post, AzDHeX
|
|
|
|
|
It is possible, of course, but not with pure web application. You have to create ActiveX component or use similar technology to access clients resources. ASP.NET runs only on server side and is separated from client.
Pilo
|
|
|
|
|
I want to add two times together. Eg. 11:05:00 + 00:10:00 the result should be 11:15:00. I am using MSSQL as my backend and ASP.Net as my frontend. One time is retrieved from MSSQL and another from the ASP.NET Dropdownlistbox. How will i add the times.
Sarvan.M
|
|
|
|
|
I don't understand why you want to add two different dates? Probably you want to add some time span to a particular date if it is so then there are somany methods available datetime in asp.net.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Simple...
TimeSpan myTimeFromDropDownList = GetTimeFromDropDownList();
TimeSpan myTimeFromSql = GetTimeFromSql();
TimeSpan myOverallTime = myTimeFromDropDownList + myTimeFromSql;
but maybe you have another probelm with it, which I don't see...
Pilo
|
|
|
|
|
Hi,
Im really struggling to find solutions to my problem so any help would be greatly appreciated!
Basically i want to create an events calendar which shows the current month. If the database holds any events for the current month these should be indicated within the calendar control on the corresponding day.
I know items can be added to the calendar using the day render event but i dont know how to best use this to get data from the SQLDataAdapter etc.
Thanks in advance.
-- modified at 8:49 Tuesday 12th September, 2006
|
|
|
|