| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 29234 | 2003-01-14 04:45:00 | ASP | agent (30) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 113646 | 2003-01-14 04:45:00 | Is there anyone here who knows anything about Active Server Pages (and connecting to databases preferrably)? If so, please let me know here, and I will post my problem, as I see no point in posting it if no one can help. | agent (30) | ||
| 113647 | 2003-01-14 05:13:00 | Yep, I've done a little bit in my time | antmannz (28) | ||
| 113648 | 2003-01-14 05:58:00 | Sorry if this ends up long . . . When I the code to access and add a new record to my database is Dim Conn, cStr, q, addb Set Conn = Server . CreateObject("ADODB . Connection") cStr = "DRIVER={Microsoft Access Driver (* . mdb)};uid=;pwd=password;DBQ=" & Server . MapPath("database . mdb") Conn . Open cStr Set addb = Server . CreateObject("ADODB . Recordset") q = "SELECT * FROM table" addb . Open q, Conn, adOpenDynamic, adLockOptimistic addb . AddNew I get the following error: Technical Information (for support personnel) Error Type: ADODB . Recordset (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another . /studentnet/spc/ref . asp, line 133 Browser Type: Mozilla/4 . 0 (compatible; MSIE 6 . 0; Windows NT 5 . 1) Page: POST 150 bytes to /studentnet/spc/ref . asp POST Data: pid=7306&firstname=firstname&lastname=lastname&email=email@domain . com&emlcnf=email@domain . com&city=auckland&password=password&passwordconfirm=password Time: Tuesday, 14 January 2003, 6:39:58 p . m . More information: Microsoft Support ( . microsoft . com/ContentRedirect . asp?prd=iis&sbp=&pver=5 . 0&ID=500;100&cat=ADODB%2ERecordset&os=&over=&hrd=&Opt1=&Opt2=%2D2146825287&Opt3=Arguments+are+of+the+wrong+type%2C+are+out+of" target="_blank">www . microsoft . com +acceptable+range%2C+or+are+in+conflict+with+one+a nother%2E) And when the code to access and add a new record to the database is Dim Conn, cStr, q, addb Set Conn = Server . CreateObject("ADODB . Connection") cStr = "Provider=Microsoft . Jet . OLEDB . 4 . 0;Data Source=D:\Inetpub\wwwroot\StudentNet\spc\db\listse c . mdb;pwd=lu2i9rIzEm" Conn . Open cStr Set addb = Server . CreateObject("ADODB . Recordset") q = "SELECT * FROM userlist" addb . Open q, Conn, adOpenDynamic, adLockOptimistic addb . AddNew I get this error: Technical Information (for support personnel) Error Type: Microsoft JET Database Engine (0x80004005) Could not find installable ISAM . /studentnet/spc/ref . asp, line 130 Browser Type: Mozilla/4 . 0 (compatible; MSIE 6 . 0; Windows NT 5 . 1) Page: POST 150 bytes to /studentnet/spc/ref . asp POST Data: pid=7306&firstname=firstname&lastname=lastname&email=email@domain . com&emlcnf=email@domain . com&city=auckland&password=password&passwordconfirm=password Time: Tuesday, 14 January 2003, 6:45:59 p . m . More information: Microsoft Support ( . microsoft . com/ContentRedirect . asp?prd=iis&sbp=&pver=5 . 0&ID=500;100&cat=Microsoft+JET+Database+Engine&os=&over=&hrd=&Opt1=&Opt2=%2D2147467259&Opt3=Could+not+find+installable+ISAM%2E" target="_blank">www . microsoft . com) |
agent (30) | ||
| 113649 | 2003-01-14 06:00:00 | I'll just be changing my database password and location now... :D | agent (30) | ||
| 113650 | 2003-01-14 06:40:00 | It appears to me that you will need to have: addb.AddNew field(list), value(list) otherwise, what are you adding?? Although in theory you should be able to use .AddNew without any parameters to create a new blank record, I think in practice it won't work, usually because some database creaters like to make some fields mandatory. I have to say that I've never used the .AddNew statement. I've always used SQL.Execute("insert sql statement here") I always found LearnASP (www.learnasp.com). |
antmannz (28) | ||
| 113651 | 2003-01-14 07:05:00 | I just cut off the rest of the statements. They go like addb.AddNew("user")("password") and continue on until I update the database, close the connection, and set the Conn value to null. I'll have a look at LearnASP anyway, so thanks. |
agent (30) | ||
| 113652 | 2003-01-14 07:28:00 | Id agree with antmannz here SQL Ive made a shopping cart in asp before and adding products using ASP I found was not always reliable. For some reason it would not always work (dont ask me why) but SQL was so much easier. Currently Im trying to make an online e-mail site, a forum, a member sites and debug my existing shopping cart (something wrong with my connection objects) Sorry I cant real help you with your script (personally I cant make cense of other peoples code) I found www.w3schools.com EXTREAMLY helpful for ASP and SQL Good Luck |
sc0ut (2899) | ||
| 113653 | 2003-01-14 07:40:00 | Thanks sc0ut. But can you access a .mdb database via using SQL? I've just always thought SQL was a different database format, because of the mySQL program. |
agent (30) | ||
| 113654 | 2003-01-14 07:46:00 | yes you can i cant give you an example thogh because i'm at work now, and all my asp is at home (and i don't have any SQL uploaded) but yes SQL can acces an ACCESS database by selecting and editing its like you can use ASP in IIS when the computer doesn't have Access (some things cant be explaind "because it takes too long to explain" |
sc0ut (2899) | ||
| 113655 | 2003-01-14 07:53:00 | PS agent how do you get the desk top that you have it cool does it always update the info? and can you get server info on it? like iis connections and **** |
sc0ut (2899) | ||
| 1 2 | |||||