Showing posts with label everybody. Show all posts
Showing posts with label everybody. Show all posts

Wednesday, March 21, 2012

I want to know how to use ADO.net connect remote datebase

Im the new in ASP.net.
I find no way to connect remote datebase(sql server 2000).
Everybody who have ways help me.
Thank you!Sorry!!It's database not datebase!!HA~~|||::I find no way to connect remote datebase(sql server 2000).
::Everybody who have ways help me.

Would be a ton of help.

Read up on ADO.NET in the documentation.|||thank you!!
but could you give me some samples!!
i want use ASP.net to connect remote database to display data!!

Monday, March 19, 2012

I update SqlExpress database but i don't see the records

Hi everybody! I 'm facing a strange problem and i hope someone could help me understand what i'm doing wrong.

The situation has as follows:

1. I make a new windows project in VB .Net 2005 and add a listbox to form1

2. With "Add new Item" from the solution explorer I add a new Sql Database from the templates to the project (e.g. MyDatabase1.mdf)

3. I add a table to the SQL Database e.g. Books - with 2 only fields (BookID and BookDescription) and I add some records to the table

4. I add a new DataSource to the project and I bind the LIstBox to the table Books.

5. I add two buttons to the project. Button1 adds a new book, Button2 gives me record by record the books in the table (e.g. 1-Vb for begginers, 2-.Net for begginers etc.)

6. I Run the project and I add a new record to the table through button1. With button2 I confirm the record is added to the table (3-Vb for me)

Till here, everything works fine...

7. I close the project. I open the table Books to see for the new record (VB for me). There is no record in the Database!

Any idea?

P.S. I've done all possible ways to add the new record (with tableadapter and with a SqlCommand). In both ways the record in runtime is added to the table and it can be confirmed.

But when I close the project and try to find it , there is no record at all!

Hi,

make sure you call the update method on your SQLDataAdapter. Otherwise the data won′t be updated though the Dataset you are working with a in its normal "disconnected" mode.

HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||

Thanks for the suggestion but of cource and i do call the update method. As I told you I can confirm that the records have been inserted.

The point is that I cannot see the records when I close the project

|||Why do you think you got a confirmation ?

Sunday, February 19, 2012

I need help performing a date query where the output is all related records to one specific date

Hi Everybody,

I need help with a query where the output is all records related to one specific date. Like take for ex. all records which have been entered on 5/26/07. I would really appreciate the help. Thanks in advance. . .

I've pasted the code which I've been using but just gives me a reserved error 3646.

SELECT Escal_Tracker.Escal_Type, Escal_Tracker.Cross_func, Escal_Tracker.cas_no, Escal_Tracker.Inc_no, Escal_Tracker.esc_com, Escal_Tracker.nt_login, Escal_Tracker.Date
FROM Escal_Tracker
WHERE date = '5/26/07';

Regards,

Inspired_One

Hi inspired_one,

Move the thread from Visual Basic Forum in order to get better answers, since this issue is related to Transact-SQL.
Thanks for your understanding!

|||

Your code is 'mostly' ok. I recommend using the ISO date format which for SQL Server, is unabiguous. Also, if any of the Date field values include a time component, they will not match. The best way to accomplish a filter criteria for a complete day is to bracket all values between midnight the desired date, and just before midnight the next date. Also when you use reserved words as your table or column names, you MUST then always enclose them in square brackets to let the server know that you made a mistake and now must type extra keystrokes to compensate. ( [Date] is a reserved word.) Refer to Books Online, Topic: 'Reserved Words'

Perhaps this will work for you...

Code Snippet


SELECT
e.Escal_Type,
e.Cross_func,
e.cas_no,
e.Inc_no,
e.esc_com,
e.nt_login,
e.[Date]
FROM Escal_Tracker e
WHERE ( e.[Date] >= '2007/05/26'
AND e.[Date] < '2007/05/27'

|||

Arnie,

Thanks a lot for the help bro. that actually led me to the answer to this problem which was .

SELECT
e.Escal_Type,
e.Cross_func,
e.cas_no,
e.Inc_no,
e.esc_com,
e.nt_login,
e.[Date]
FROM Escal_Tracker e
WHERE ( e.[Date] >= # " & varfirstdate & " # AND e.[Date] < # " & varseconddate & " #

The difference is I'm using vba variables for this code. . .

Regards,

Inspired one

I need help performing a date query where the output is all related records to one specific date

Hi Everybody,

I need help with a query where the output is all records related to one specific date. Like take for ex. all records which have been entered on 5/26/07. I would really appreciate the help. Thanks in advance. . .

I've pasted the code which I've been using but just gives me a reserved error 3646.

SELECT Escal_Tracker.Escal_Type, Escal_Tracker.Cross_func, Escal_Tracker.cas_no, Escal_Tracker.Inc_no, Escal_Tracker.esc_com, Escal_Tracker.nt_login, Escal_Tracker.Date
FROM Escal_Tracker
WHERE date = '5/26/07';

Regards,

Inspired_One

Hi inspired_one,

Move the thread from Visual Basic Forum in order to get better answers, since this issue is related to Transact-SQL.
Thanks for your understanding!

|||

Your code is 'mostly' ok. I recommend using the ISO date format which for SQL Server, is unabiguous. Also, if any of the Date field values include a time component, they will not match. The best way to accomplish a filter criteria for a complete day is to bracket all values between midnight the desired date, and just before midnight the next date. Also when you use reserved words as your table or column names, you MUST then always enclose them in square brackets to let the server know that you made a mistake and now must type extra keystrokes to compensate. ( [Date] is a reserved word.) Refer to Books Online, Topic: 'Reserved Words'

Perhaps this will work for you...

Code Snippet


SELECT
e.Escal_Type,
e.Cross_func,
e.cas_no,
e.Inc_no,
e.esc_com,
e.nt_login,
e.[Date]
FROM Escal_Tracker e
WHERE ( e.[Date] >= '2007/05/26'
AND e.[Date] < '2007/05/27'

|||

Arnie,

Thanks a lot for the help bro. that actually led me to the answer to this problem which was .

SELECT
e.Escal_Type,
e.Cross_func,
e.cas_no,
e.Inc_no,
e.esc_com,
e.nt_login,
e.[Date]
FROM Escal_Tracker e
WHERE ( e.[Date] >= # " & varfirstdate & " # AND e.[Date] < # " & varseconddate & " #

The difference is I'm using vba variables for this code. . .

Regards,

Inspired one