-
Re: connection between SQL Server 2. and dreamweaver??
-
Re: connection between SQL Server 2. and dreamweaver??
so, did you try to add a user?
you can see the user in data table.
-
Re: connection between SQL Server 2. and dreamweaver??
Ok, it's kind of working.
First i open the asp - submitted the info - and this error pop out:
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/user.asp, line 157
And it's saving the data in my DB. which is a good sing, right?
-
Re: connection between SQL Server 2. and dreamweaver??
so are you sure your table has column named USERID?
can you confirm it?
-
Re: connection between SQL Server 2. and dreamweaver??
Your too fast for me.
Yes, the first time i tried to save the data andit didn't worked, but know that you told me about the " . , it saves the data but doesn't show because of the error, i looked at my DB and it's there so i can see the user.
-
Re: connection between SQL Server 2. and dreamweaver??
ok, give me a second, i'm checking
-
Re: connection between SQL Server 2. and dreamweaver??
yes, my table has a column named UserID and it has a 4 in it.
Probably it's because i have tried it 4 times, right?
-
Re: connection between SQL Server 2. and dreamweaver??
ok
still, it seems strange.
change your line 157 to this:
<td width="10%" align="left" bgcolor="#ffffff"><a href="edituser.asp?id=50000"><%=rs("NtID")%></a></td>
and then load the page, tell me the result
-
Re: connection between SQL Server 2. and dreamweaver??
<td width="10%" align="left" bgcolor="#ffffff"><a href="edituser.asp?id=<%=rs("UserID")%>"><%=rs("NtID")%></a></td>
Is this line right?
-
Re: connection between SQL Server 2. and dreamweaver??
ok, ignore my last post. :-)
-
Re: connection between SQL Server 2. and dreamweaver??
also,
look at your data table in SQL Server, any user has USERID blank (no number) ?
-
Re: connection between SQL Server 2. and dreamweaver??
the line is right. but some problem with data/database.
-
Re: connection between SQL Server 2. and dreamweaver??
by the way, do you have MSN. that will save some delays.
-
Re: connection between SQL Server 2. and dreamweaver??
Yeahh!! it worked, now i can see the whole thing.
The new column "Number" is cool, but can the same error be at the edituser.asp?
When i press the number, which is in order except in the DB, this new error opens:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'UserID'.
/edituser.asp, line 35
-
Re: connection between SQL Server 2. and dreamweaver??
-
Re: connection between SQL Server 2. and dreamweaver??
sorry. i can't follow you. I think there is some problem with your column USERID.
Try this:
change USERID to ID
set as INT, Identity YES (NOT FOR REPLICATION)
In your user.asp page and edituser.asp page, search and replace USERID for ID
Then run the page and tell me the result
-
Re: connection between SQL Server 2. and dreamweaver??
OK. if you didn't do that already, here are the steps:
-
Re: connection between SQL Server 2. and dreamweaver??
1. set up a new Field in your table named ID
2. set the field as INT, under Identity, should be NO
3. save the table
4. open the table in data view (all records)
5. go down your data table under ID column and enter the numbers for each record:
1, 2, 3, 4, 5.....
6. save the records.
7. close this table and opent eh design table view
8. set ID field as IDENTITY YES (NOT FOR REPLICATION)
9. save table again
10. do the replace I mentioned above
11. run the user.asp page
12. tell me what happened
-
Re: connection between SQL Server 2. and dreamweaver??
Hello,
I was wondering how can i bring data from two different tables?
If i have UserTbl and the Training table, and i want to show which user is in what training.
It's very late here, i just wanted to tell u this.
Thanks
-
Re: connection between SQL Server 2. and dreamweaver??
hi Edith.
It is not difficult.
It just needs that one column in both tables is the same (for example userid)
This is another good reason to have an ID column in every table, you can relate them to other tables.
I will give you an example. if you can't solve it from the example, let me know:
There are two tables, tblTraining and tblUsers
tblUsers has fields: UserID Username Firstname Lastname Telephone
tblTraining has fields: StartDate EndDate Trainer UserID Hours Cost
These are just sample columns to show how to join them in your SQL
So I want to make a table about training, but I want to include the user's firstname and last name, right?
SQL = "select StartDate, EndDate, Trainer, Hours, Cost, tblTraining.UserID, tblUsers.Firstname, tblUsers.Lastname from tblTraining LEFT JOIN tblUsers ON tblTraining.UserID = tblUsers.UserID"
So you see sql recognizes that the Userid from tblTraining can match one record on tblUsers, and it brings the firstname and lastname columns from that table to the recordset.
And when you are showing records, it's the same as usual
response.write rs("StartDate")
response.write rs("Firstname")
no difference.
OK. there are more details related to LEFT JOIN, but for now that is enough to accomplish what you want to do.
Let me know if you have questions.
-
Re: connection between SQL Server 2. and dreamweaver??
OK.
one more small detail.
you see I wrote tblTraining.UserID in the sql. If two tables have a same name column and you join them in sql you have to write them as TABLENAME.COLUMNNAME, so that sql knows which table's column you mean.
-
Re: connection between SQL Server 2. and dreamweaver??
I mess up,..
Something is wrong !!
First i added the sql line to select the tbls in the trainingpage.asp and i did the same thing in the edittraining.asp .... So, when i test it (the trainingpage.asp) - fill the blanks -- press submit, it says that the training is already in the DB....
When i test the edittraining.asp --- change a number, and write a description, it says that i have enter a number for a different training.
I hope you understand this mess,
Thanks!!
-
Re: connection between SQL Server 2. and dreamweaver??
Hi,
Last time u told me to do another sql, because i just don't want to see data from another tbl but to be able to modify it.
So i tried to do another sql select..... and the page couldn't open (it showed this error)
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '='.
/trainingpage.asp, line 10
And this is line 9 and 10:
sql = "select * from Training where TrainingNum = " & sTrainingNum
sql = "select * from Skills where SkillNum = " & sSkillNum
thanks for the input ;-)
-
Re: connection between SQL Server 2. and dreamweaver??
Never mind my last post, i changed it.
I'm going to try something from a book, probably won't work but anyway.
-
Re: connection between SQL Server 2. and dreamweaver??
Hello
I kind of did the same changes we did to training page to edit training, so i'll be send you the zip for that.
The training page works great, the edit page doesn't.
-
Re: connection between SQL Server 2. and dreamweaver??
Hi, wengang
I'm kind of doing the same thing to another asp page named comppage. This has a few modifications, no big deal, and it's giving me syntax error.... weird cause i checked and double checked and there's none that i could see.
Well, maybe u could :-)
Thanks !!
-
Re: connection between SQL Server 2. and dreamweaver??
Something weird is happening in the edit training page.
I'm triyng to select, in the skill name column, the skill name 4 and when i submit, it changes back to the orginal number (which was one).... :(
-
Re: connection between SQL Server 2. and dreamweaver??
-
Re: connection between SQL Server 2. and dreamweaver??
so, the file i sent last time was wrong. that is the developer bootstrapper.
the right file is the 1.1 framework.
I uploaded it to:
http://www.accuracyauto.com/gary/dotnetfx.exe
Install that and you will be able to run any .net application
-
Re: connection between SQL Server 2. and dreamweaver??
Hey,
Do u remeber the command u gave me to if I had the direct X installed in my PC?
I wanted to use in a laptop, to see if they have it, but I can't remember it.
Well, thanks for the file, i'm downloading it right now.
Ps. i have a few questions about that!!
-
Re: connection between SQL Server 2. and dreamweaver??
dxdiag
Direct X Diagnostic
by the way, if you get the game working, I finally worked out the major bugs yesterday. I'll send you an updated copy
-
Re: connection between SQL Server 2. and dreamweaver??
That's great i'll check it on monday at the office.
Thanks!!
-
Re: connection between SQL Server 2. and dreamweaver??
Hello,
I have one question. :-)
Can i unite two of the pages i created, for example:
comppage with Trainingpage???
Another Q:
What if i want the user, and the user could be the manager or an employee, to be able to modify the date of a training. The page shows the Training Name and the date the training is going to take place, and the blank where the user is going to put the new date for the training.
Ok, that's it for now!!!
-
Re: connection between SQL Server 2. and dreamweaver??
Hi,
I want to show all the skills a training has.
A selected training must show all the skills, but each skill have a check box; so the user can choose the right skill for that training in particular, ...
Anyway , thought u could help.
Thanks!!
-
1 Attachment(s)
Re: connection between SQL Server 2. and dreamweaver??
-
Re: connection between SQL Server 2. and dreamweaver??
Hi,
There's an error in the page.
Invalid use of Null: 'split'
And this is the line:
tEach = split(tSkills,";")
Is it because i change the name of the page? Because that's all the change i did to the page.
Thank you anyway :)
-
1 Attachment(s)
Re: connection between SQL Server 2. and dreamweaver??
-
Re: connection between SQL Server 2. and dreamweaver??
Hello,
How can i relate three tbls?
For example: Training - Skills - Competency.
-
Re: connection between SQL Server 2. and dreamweaver??
Also, how can i generate a report in HTML, Excel and/or Word Format?
Can that be done?
-
Re: connection between SQL Server 2. and dreamweaver??
Hi,
I'm having trouble with cint. What is it?
\Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'cint'
This is the line: sList = sList & sSkill(cint(tEach(t))) & "<br>"
Please help, this is my last day it will be the las time i'll bother u, i promise.
-
Re: [RESOLVED] connection between SQL Server 2. and dreamweaver??
hi. it's no bother.
cint() means convert to integer
if it is making an error (mismatch) the the argument is not numeric (in this case tEach(t))
So you have to check the value of tEach(t) and see what it is.